Aquality Selenium is a library built over Selenium WebDriver tool that allows to automate work with web browsers. Selenium WebDriver requires some skill and experience. So, Aquality Selenium suggests simplified and most importantly safer and more stable way to work with Selenium WebDriver.
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.
Breaking news!
Starting from v4.4.0 onwards, this package requires Java 11 or higher, as Selenium has stopped support of Java 8. The last version available for Java 8 is v4.3.3
To start the project using aquality.selenium framework, you can download our template BDD project by this link.
Alternatively, you can follow the steps below:
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium</artifactId>
<version>4.x.x</version>
</dependency>
Browser browser = AqualityServices.getBrowser();
browser.maximize();
browser.goTo("https://wikipedia.org");
browser.waitForPageToLoad();
ITextBox txbSearch = AqualityServices.getElementFactory().getTextBox(By.id("searchInput"), "Search");
txbSearch.type("Selenium WebDriver");
txbSearch.submit();
browser.waitForPageToLoad();
browser.network().addBasicAuthentication("domain.com", "username", "password");
or intercept network requests/responses:
browser.network().startNetworkInterceptor((HttpHandler) request -> new HttpResponse()
.setStatus(HttpStatus.SC_OK)
.addHeader("Content-Type", MediaType.HTML_UTF_8.toString())
.setContent(utf8String("Some phrase")));
final double latitude = 53.90772672521578;
final double longitude = 27.458060411865375;
final double accuracy = 0.97;
browser.devTools().emulation().setGeolocationOverride(latitude, longitude, accuracy);
See more DevTools use cases here
browser.quit();
See quick start example here
To get more details please look at documentation:
Library's source code is made available under the Apache 2.0 license.