appium / appium

Cross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol
http://appium.io/
Apache License 2.0
18.75k stars 6.06k forks source link

[iOS 13.3 only] Cannot find elements on Auth0 page with error XCTDaemonErrorDomain Code=11 #13731

Closed nimaiwalsh closed 4 years ago

nimaiwalsh commented 4 years ago

The problem

Appium is not able to locate elements on a AuthO Salesforce page on iOS 13.3. It has worked on all previous iOS versions. When appium is not running, you can easily manually click and enter details into the text inputs and use the page.

This also occurs when using the Element Inspector with Appium Studio, no elements can be located and the screen appears to freeze.

Environment

Details

Error in logs when trying find the elements on the page using driver.pageSource()

[Xcode] 2019-12-17 08:18:03.043097+1000 WebDriverAgentRunner-Runner[1256:255088] Cannot request the screen point at NSPoint: {187.5, 525.74933333333331}: Error Domain=XCTDaemonErrorDomain Code=11 "No AXElement found at {188 526}: kAXErrorCannotComplete" UserInfo={NSLocalizedDescription=No AXElement found at {188 526}: kAXErrorCannotComplete}

It appears similar to this issue: https://github.com/facebookarchive/WebDriverAgent/issues/372 and also occurs when an Auth0 pop up page for Salesforce is displayed.

mykola-mokhnach commented 4 years ago

You could try the solution from https://github.com/appium/appium/issues/13681 as the possible workaround. We cannot do much there on Appium side there since the error is caused by XCTest itself

KS261187 commented 4 years ago

@nimaiwalsh nimaiwalsh, any luck with this issue?. I am also facing the same issue and I did followed the steps mentioned in 13681 but it is of no help.

nimaiwalsh commented 4 years ago

Hi @KS261187 unfortunately nothing yet. We currently have to hold off all testing on iOS 13.3 until we can also figure out a solution. We also run many of our tests on AWS Device Farm. I will post in this thread if we can come up with a fix.

mykola-mokhnach commented 4 years ago

Closed as third party issue

KS261187 commented 4 years ago

So if i am not wrong, your app is built using ionic framework correct?. The reason I am asking this is we have similar apps built using phone gap and ionic and both these apps are not working with 13.3. However I tried downloading other phone gap apps from App Store and it is working fine as expected. Really clueless at this point.

nimaiwalsh commented 4 years ago

Our app is built using Xamarin and is currently a mixture of Forms and Native. Yer I’m completely clueless too considering everything was previously working fine. At this stage it is only an Auth0 pop-up that is causing the issue, unfortunately for tests to start we require the user to be logged in 😂

KS261187 commented 4 years ago

So did you try to login manually and try inspecting the objects. For me the app freezes but I can certainly try to set the auto launch to false and login manually. Just want to see if you tried that route? Another thing common i can see is that my app also makes a call to sales force . Not sure if that has anything to do here. Where you able to check with your developers regarding the same. Appreciate your response on the same as you are my only source of contact to talk regarding this issue.

nimaiwalsh commented 4 years ago

Yes I can login manually and it works like a charm. However if I log in manually, and inspect the Salesforce Auth0 pop up with Appium Inspector it sort of freezes up too. It’s not until I close Appium Inspector down and restart the app the it works correctly again. Manually login is not viable for our tests so we definitely need to get this fixed moving forward too.

KS261187 commented 4 years ago

So i got a hunch. Looks like the issue is with the textbox in 13.3. I logged in manually and went to a page where there is no textfield and it worked like a charm. Please give it a try where there is no textfield and try to inspect on that page.

nimaiwalsh commented 4 years ago

Hi @KS261187,

Yer the Salesforce Auth0 page has a text box to input credentials. This is the page we are having issues with. If the user is already logged in, all the other elements are found and the tests work as expected. Any other ideas?

KS261187 commented 4 years ago

I guess this is a bug with Apple . I can already see most of the people reported the same issue both with web and native view under xcuitest forum. Looks like they broke the text fields completely with iOS 13.3. Let’s hope they fix this with Xcode 12. Let me know if you have got any ideas but for now all we can do is to wait for the fix from their end.

nimaiwalsh commented 4 years ago

Thanks. Let's hope the release another update shortly to fix the issue 😄

KS261187 commented 4 years ago

So suddenly my app started to work with iOS 13.3. All I did was uninstall the Appium beta, reinstall Appium beta and updated the node version to 13.6 and then started using the inspector using custom server and it started to show up fine. The issue is still there with Appium 1.15.1. So don't use that.

nimaiwalsh commented 4 years ago

Thanks for the tip,

I just updated Appium to the latest minor release as mentioned (1.16) and reinstalled webdriveragentrunner on the device and now it is all working as expected.

KS261187 commented 4 years ago

Glad it worked👍

Sent from my iPhone

On Jan 14, 2020, at 12:47 AM, Nimai Walsh notifications@github.com wrote:

 Thanks for the tip,

I just updated Appium to the latest minor release as mentioned (1.16) and reinstalled webdriveragentrunner on the device and now it is all working as expected.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.