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

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