-
Notifications
You must be signed in to change notification settings - Fork 74
Accept alert message and switch back to main window #234
Comments
The code you have here will behave identically in Serenity and Selenium |
Acually i want to use getAlert().accept(); and then move to main window. How this is done using serenity api |
Serenity just wraps Selenium, so you would do the same as in Selenium |
Hi, I have a feature file with 2 scenarios
Now here, I am getting an error saying that "org.openqa.selenium.NoSuchWindowException: no such window: target window already closed" and none of the elements are found. Thanks In Advance |
How would you do it with Selenium? |
Hi, But for serenity approach below is the code In the second scenario, I have step defination
DeeplinkStep DeeplinkPage deeplinkPage;
Deeplink page object @NamedUrls(
} |
You can use getDriver() inside a PageObject or UIStepInteraction class for this |
Hi,
How to achieve the below lines using serenity
getDriver().switchTo().alert().accept();
getDriver().switchTo().defaultContent();
Thanks in Advance
The text was updated successfully, but these errors were encountered: