This package is a library designed to simplify your work with Selenium WebDriver.
You've got to use this set of methods, related to most common actions performed with web elements.
Most of performed methods are logged using LOG4J, so you can easily see a history of performed actions in your log.
We use interfaces where is possible, so you can implement your own version of target interface with no need to rewrite other classes.
- To start work with this package, simply add the dependency to your pom.xml:
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium</artifactId>
<version>LATEST</version>
</dependency>
- Create instance of Browser in your test method:
Browser browser = AqualityServices.getBrowser();
- Use Browser's methods directly for general actions, such as navigation, window resize, scrolling and alerts handling:
browser.maximize();
browser.goTo("https://wikipedia.org");
browser.waitForPageToLoad();
- Use ElementFactory class's methods to get an instance of each element.
ITextBox txbSearch = AqualityServices.getElementFactory().getTextBox(By.id("searchInput"), "Search");
- Call element's methods to perform action with element:
txbSearch.type("Selenium WebDriver");
txbSearch.submit();
browser.waitForPageToLoad();
- Quit browser at the end
browser.quit();
See full example here
To get more details please look at documentation: