What is WebDriver?
WebDriver it’s an open source tool ,and the most common tool for web function testing.
WebDriver project focus on :
- simulate action on the browser as regular user.
- cross browsers(also mobile) testing.
- OO API design and simpler API
- backward compatibility – almost fully support in the old API and support in SeleniumGrid
- overcomes the limitation of Selenium Rc :Single Host origin policy , file upload or download, pop-ups and dialogs barrier.
|Element id attribute||By.id(“elementId”)|
|Element name attribute||By.name(“elementName”)|
|Link Text||By.linkText(“Click Me!”)
patterns and extensions
- Page Object design pattern –useful and simple design pattern that helps you design your code into pages. Add abstraction of the UI into Code. each page expose public interface and on actions that result in navigation that interface returns another page that implemented in the same pattern.
- Domain Driven Design – Express your tests in the language of the end-user of the app.
- LoadableComponent – extend the Page Object pattern and make the load of the components less painful.
- BotStyleTests – alternative to the Page Object pattern.Bot Style action-oriented abstraction layer that helps the automation developer reuse and encapsulate Selenium actions.
- fluent-selenium – nice project that aims to provide for more readable code.this project also provide:Built-in Assertions,Ajax handling,auto retry ,find element by attribute(not just id or name or class)
- Page Factory -the ability to init all the page( of Page Object pattern) elements via reflection.
How Top-Q Contributes and improve WebDriver project
- jsystem-so-webdriver – Maven Jsystem driver that help you init Webdriver for external xml file (SUT file). the main feature are:
- init the browsers in a simple way from external file (no need to download additional files e.g. IeDriverServer.exe that required in case of IE).
- Save the browser state between tests
- close the browser after the execution
- built-in support in Page Object pattern
- automatic logging (on each action) without changing your code
- automatic screenshot(on each action)without changing your code
compatibility – Maven Jsystem driver for projects that want to upgrade to WebDriver from SeleniumRC without changes the tests code.