How do I identify the Xpath of randomly generated POP UPs | Appium Forum
K
kaivalyakumar patel Posted on 17/10/2018
Hi Ashishji,
I was following your answer in one of the question asked by students in thread httpwwwtestautomationgurucomselenium-webdriver-how-to-handle-annoying-random-popup-alerts. 

I am not sure how to get the xpath through scripts. Can you please redirect to videos or links. 
Thank You 
Kaivalya 

A
aditya Replied on 29/11/2018

driver.findElement(By.id("android:id/button1")).click();

android:id/button1 corresponds to id of button on popup


A
Akhil Arora Replied on 01/12/2018

Suppose if the pop has two buttons, which button it will click with this pop up?


A
aditya Replied on 11/12/2018

then you need to automate the whole dialog