How do I identify the Xpath of randomly generated POP UPs | Appium Training|Appium tutorials
30% Mid August Discount Avail now

Appium Training Forum

How do I identify the Xpath of randomly generated POP UPs

K
kaivalyakumar patel Post 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

Instructor

aditya Reply 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 Reply on 01/12/2018

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

A

Instructor

aditya Reply on 11/12/2018

then you need to automate the whole dialog