Appium Training Forum

httpwwwtestautomationgurucomselenium-webdriver-how-to-handle-annoying-random-popup-alerts

M
Manju Bansal Post on 07/10/2018

M
Manju Bansal Reply on 07/10/2018

HI Ashish 
I have been asked this question three time in interview how to handle random popup in selenium when we dont know when popup will appear I tried to read above link but tried to understand but i am not getting. In my job i was doing automation of RestAPI using restassured and now I am getting jobs  require selenium. Can you help me with my query.

A

Instructor

Ashish Thakur 4 days go

Simple take the path of the alert buttons.If you want to accept then take the xpth for accept .for dismiss take the path of dissmis button and click.Use the below command
driver.findElement(By.xpath("")).click.