DriverActions
Static methodsâ
withDriver
â
This will return IDriverActions
which will expose different methods to handle all other driver actions.
IDriverActions driverActions = DriverActions.withDriver ();
Instance methodsâ
executeScript (script, args[])
â
This method will execute the JS script and returns the result.
import static io.github.boykaframework.actions.drivers.DriverActions.withDriver;
. . .
String output = withDriver ().executeScript ("alert('Hello World');");
pause
â
This method is used to navigate to the given URL.
import static io.github.boykaframework.actions.drivers.DriverActions.withDriver;
import static java.time.Duration.ofMillis;
. . .
withDriver ().pause (ofMillis (100));
saveLogs
â
This method will save all the logs captured by the Driver.
import static io.github.boykaframework.actions.drivers.DriverActions.withDriver;
. . .
withDriver ().saveLogs ();
waitUntil
â
This method will wait for any given condition to be true. It takes in Selenium WebDrivers ExpectedCondition<Boolean>
object as parameter.
import static io.github.boykaframework.actions.drivers.DriverActions.withDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
. . .
withDriver ().waitUntil (ExpectedConditions.urlMatches (URL));