How To Click A Button In A Popup?

Not able to click on "OK" button of facebook popup in Appium iOS

  • I am trying to automate Facebook signup with my iOS app through Appium iOS. When I click on the Facebook signup button, it takes me to the Facebook permission popup where I have to click the OK button, but I am not able to perform the click operation. I am trying following code: driver.findElement(By.name("OK")).click(); It is working in Android but not working in iOS app. Screenshot is available on following url https://www.dropbox.com/s/e54qevzdosk8n3t/Screen%20Shot%202015-05-11%20at%2012.06.57%20pm.png?dl=0

  • Answer:

    When we authenticate using Facebook this means is it authenticating using "Oauth". for that there can be three Authentication scenarios using Facebook App. External browser(i.e. safari). Embedded browser. In case of Facebook app: Appuim will not work, as it will redirect to Facebook app and and appium can not handle your app and facebook app with same appium driver. In Case of External browser(i.e. safari): Again as above authentication will happen on safari browser and appium can not handle your app and safari with same appium driver. In case of Embedded browser: Appium can handle the UI, as ui is part of Application.

Rohit Doraya at Stack Overflow Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.