Human Factors of XR: Using Human Factors to Design XR Systems
Module 01 - WebDriver Basics
1. Naveen P.N
Trainer
Module 01 - WebDriver Basics
NPN TrainingTraining is the essence of success and
we are committed to it
www.npntraining.com
2. Course Topics `
WebDriver Basics
Module - I
Locators
Module - II
Exploring Selenium API - I
Module - III
Exploring Selenium API - II
Module - IV
Advance Locators
Module - V
Controlling Test Flow
Module - VI
Data Driven Testing
Module - IX
Module - X
Page Object Model & Page Factory
Module - XI
Keyword Driven Framework
Module - XII
Testing HTML5 Web Application
Advance Interactions of WebDriver
Module - VII
Understanding WebDriver events
Module - VIII
Selenium Grid
Module - XIII
Interview Preparation
Module - XV
Continuous Integration
Module - XIV
3. Attaching Selenium jars into project
Working with FirefoxDriver
Working with ChromeDriver
Working with InternetExplorerDriver
Exploring FirefoxBinary class
Firefox profile Manager
Overview of Selenium
Topics for the Module`
Attaching Selenium Documentation to eclipse
Exploring Proxy class
Difference between close() and quit()
Working with HTMLUnitDriver
Exploring FirefoxProfile and ProfilesIni class
Understanding DesiredCapabilities class
Maximizing and moving windows
6. Working with ChromeDriver
Chrome Driver is maintained / supported by the Chromium project itself. WebDriver works with Chrome
through the chromedriver binary (found on the chromium project’s download page).
www.npntraining.com
9. Working with HTMLUnitDriver
This is currently the fastest and most lightweight implementation of WebDriver. HtmlUnitDriver
works behind the scenes. HtmlUnit is a java based implementation of a WebBrowser without a
GUI.
www.npntraining.com
10. Working with HTMLUnitDriver Contd…
i. None of the popular browsers uses the JavaScript engine used by HtmlUnit (Rhino). If you test JavaScript
using HtmlUnit the results may differ significantly from those browsers.
ii. When we say “JavaScript” we actually mean “JavaScript and the DOM”. Although the DOM is defined by
the W3C each browser has its own quirks and differences in their implementation of the DOM and in how
JavaScript interacts with it. HtmlUnit has an impressively complete implementation of the DOM and has
good support for using JavaScript, but it is no different from any other browser: it has its own quirks and
differences from both the W3C standard and the DOM implementations of the major browsers, despite its
ability to mimic other browsers.
iii. With WebDriver, we had to make a choice; do we enable HtmlUnit’s JavaScript capabilities and run the risk
of teams running into problems that only manifest themselves there, or do we leave JavaScript disabled,
knowing that there are more and more sites that rely on JavaScript? We took the conservative approach,
and by default have disabled support when we use HtmlUnit. With each release of both WebDriver and
HtmlUnit, we reassess this decision: we hope to enable JavaScript by default on the HtmlUnit at some
point.
HtmlUnitDriver driver =new HtmlUnitDriver(true)
13. Exploring Firefox Profiles
A profile in Firefox is a collection of bookmarks, browser settings, extensions, and history; in short
all your personal settings which is stored in separate location.
www.npntraining.com
15. Exploring Proxy class
A proxy server is a server (a computer system or an application) that acts as an intermediary for requests
from clients seeking resources from other servers. A client connects to the proxy server, requesting some
service, such as a file, connection, web page, or other resource available from a different server and the proxy
server evaluates the request as a way to simplify and control its complexity.
www.npntraining.com
22. What is WebDriver ? What are the concreate
implementation of
WebDriver ?
Name some of the abstract
methods present in
WebDriver interface ?
What are the different methods
present in WebDriver to locate
elements ?
What is the use of Firefox
Profile ?
What additional configuration
need to be done to start
internet explorer?
What is special about
HTMLUnitDriver ?
23. `
Agenda for Next Class
Installing FireBug and FirePath
Inspecting elements using Firebug and Firepath
Different ways to locate web elements
Using the By locating mechanism
Understanding driver.findElement(By by)
Understanding List<WebElement> driver.findElements(By by)
Handling basic Authentication
www.npntraining.com