java - How to accept this alert in appium? -


appium v1.6.4-beta xcode 8.2 macos sierra 10.12

i want automate save photo in device. in first time have give permission. have used "accept alert", cannot accept alert allow access photo library. shows test passed in green , when execute test, popup still appear in view , photo not saved.

this script

//check save  driver.findelement(by.id("save")).click(); driver.switchto().alert().accept(); 

capabilities used ,

 capabilities.setcapability("autoacceptalerts", true); 

this want allow

enter image description here

how accept alert? have tried xpath sa well, no luck

below code work.give try "ok" , "ok". because if want try identify element text can use accessibilityid or id.

driver.findelement(by.id("ok")).click(); 

below code won't work alerts coming in mobile automation web alerts.

driver.switchto().alert().accept(); 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -