0

I have a scenario where I need to sign in using Facebook, so when I used UiAutomator viewer to inspect I am not able to find any element.

So how to perform automation in such cases. Facebook pop up

1

The element you've highlighted in the inspector is a WebView. A developer would have to provide a build of the app with WebView debugging enabled in order to view and interact with the elements inside the WebView using automation.

I haven't enabled it personally, but I've asked developers to do this in the past, and they're generally happy to do it for a debug build.

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    WebView.setWebContentsDebuggingEnabled(true);
}

The full details can be found on this page: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews

| improve this answer | |
0

Use the structure. Appium allows you to access the entire spectrum of WebDriver commands (I recommend any test automation engineer to read this https://www.w3.org/TR/webdriver1/ by the way) to do your automation. You can easily define a path through your application using an appropriate xpath. I don't know which app you're trying to automate but if you keep in mind that xpaths allow boolean operations as well as matching to any attribute I'd be surprised if you can't find a more or less solid path to your desired elements.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.