NavigateActions
Static methodsâ
navigate
â
This will return INavigateActions
which will expose different methods to handle navigate related actions.
INavigateActions navigateActions = NavigateActions.navigate ();
Instance methodsâ
back
â
This method will go back to the previous page.
import static io.github.boykaframework.actions.drivers.NavigateActions.navigate;
. . .
navigate ().back ();
forward
â
This method will go forward to the next page.
import static io.github.boykaframework.actions.drivers.NavigateActions.navigate;
. . .
navigate ().forward ();
refresh
â
This method will refresh the browser window.
import static io.github.boykaframework.actions.drivers.NavigateActions.navigate;
. . .
navigate ().refresh ();
to
â
This method will navigate you to the URL mentioned.
import static io.github.boykaframework.actions.drivers.NavigateActions.navigate;
. . .
navigate ().to ("https://google.com");
toBaseUrl
â
This method will navigate to the base URL mentioned in the config file.
import static io.github.boykaframework.actions.drivers.NavigateActions.navigate;
. . .
navigate ().toBaseUrl ();
getUrl
â
This method will get the URL of the browser window.
import static io.github.boykaframework.actions.drivers.NavigateActions.navigate;
. . .
System.out.println (navigate ().getUrl ());
verifyUrl
â
This method is used to verify the browser url.
import static io.github.boykaframework.actions.drivers.NavigateActions.navigate;
. . .
navigate ().verifyUrl ()
.isEqualTo ("https://www.swaglabs.com/");