Hi all,
I was trying to automate inbuilt app. After doing some operation device will pop up balance alert info from network. As this popup is not consistent, i was not able to find that element in the flow.
There are two questions here.
1. Is it possible to declare all(which ever required) elements instead of finding elements when device disaplays.
2. I'm using code below to click on OK(Alert msg from network)
WebElement ok =
driver.findElement(By.name("OK"));
if (ok.isDisplayed()){
ok.click();}
Problem here is sometimes Alert message wont display and Test script fails. Is there any way to accept all alerts pop ups using JAVA?
Thanks in advance..:)
Regards,
Yogeesh