Unable to access web view & text fields in SFSafariViewController UI test with Xcode 11.3

We used to be able to enter usernames / passwords in SFSafariViewController by running the query app.webViews but we're no longer able to do so.


Does anyone know how to do this with Xcode 11.3 ?


thanks,

David

Have you found any workaround for this issue yet? Having this issue too: app.webViews are there but are "empty", we cannot see what is in them or interact with them.

Same issue here. I am using native view context here and it times out upon finding the textfield. This issue is very specific to IOS 13.3.

I too encountered this and logged it as FB7513956. Please make sure you log similar feedbacks so that it can get addressed.

This is not resolved with Xcode 11.3.1 and iOS 13.3.1 beta 2

Facing same problem on 11.3.1 and iOS 13.3.1 beta 2

I've raised a feedback message for this: FB7537885

Hello, wondering if you have received any reply in that feedback ticket. I have opened a similar one (7529542) but no reply yet.

This issue is blocking us for running our automated tests 😟

Thanks!

I received this update this morning: "Potential fix identified - For a future OS update". So, look out for a new beta release I guess?

Thanks for your reply! looking forward to that new update then 🙂 Hopefully it happens soon...

This is not resolved with Xcode 11.3.1 (11C505) and iOS 13.3.1 beta 3 (17D5050a)

No fix on 13.3.1 beta 3 :/ so suppose we will have to wait until beta 4 will be released :/

I have the same status: "Potential fix identified - For a future OS update"

In case anyone else is interested, I got around this by using the 13.2.2 simulator in my UI tests.


You can have multiple schemes and tick which tests to run, so if you have a subset of tests that need 13.2.2, you can tick the tests to run in that scheme only (and untick them in the other scheme) - then if you've got a CI / buld server with a script calling xcodebuild you can specify the different scheme and different simulator version, something lke:


-scheme "ui-tests-only-for-13.2.2" -destination "platform=iOS Simulator,name=iPhone 11,OS=13.2.2"


We're just using 13.2.2 for all our tests - but that above is (possibly) a workaround if you need to split out tests on a build server for iOS 13.3 specifically (depends if you're not bothered about testing other features of SFSafariViewController on 13.3 though!)


We plan on doing this until we need something specific about iOS 13.3 for SFSafariViewController.


Fingers crossed Apple will sort it out for iOS 14 😉

I think part of the problem is addressed with Xcode 11.4 beta (11N111s) and iOS 13.4 beta 1 (17E5223h). The UI automation tests are able to successfully interact with SFSafariViewController and ASWebAuthenticationSession, however, the tap event causes the text action menu (cut, copy, paste, select all) to come up and the test idles itself while that is visible. Dismissing this causes some text input to be incomplete, leading to test failures. Is anyone else experiencing the same behavior?

can confirm that it is working on my side as well, and looks alright.

I think I found out why my tests aren't working. The UI elements I'm interacting with during login have the autofocus attribute set. According XCUITest, the text field has keyboard focus when in fact the keyboard is not active at all. I can sometimes work around this by backgrounding and then foregrounding the application to get the keyboard to show up (which then makes input work). I have commented on my Feedbak indicating that this needs to be fixed since it worked in iOS 13.2 and lower.

have you tried newest 13.4 beta ?

Web interactions broke entirely with iOS 13.4 beta 3. It is working (even with autofocus) on beta 4, however, I discovered a new regression. Each interaction with the application/device requires a 60 second wait as the accessibility service believes that com.apple.Spotlight is an interrupting process that needs to idle.

Seems to be working much better in iOS 13.4 with the official release of both the OS and Xcode. Still running into a problem where the first character to be input into a web field is not always entered.

Not fixed in Xcode 13.4.1(13F100) and build setting iOS13, with physical iOS 15.6.1 device.

When app load UIInputViewController: [AXRuntimeCommon] Unknown client:

After dismiss UIInputViewController, this shows up and app crash:

[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:43614

Hello!

It seems that some of these issues have been resolved and others have not.

If you are still seeing issues in this area, please file a report on Feedback Assistant with an attached .xcresult file showcasing your test failures so the team can investigate.

https://feedbackassistant.apple.com/

.xcresult files can be obtained from Xcode by right-clicking a test result and clicking "Show in Finder"

Unable to access web view & text fields in SFSafariViewController UI test with Xcode 11.3
 
 
Q