XCUITest with WKWebViews

Hi team! I’ve been working on XCUITest cases loading a web page (Angular, CSS, JS) to the WKWebView.

The test case is very simple, click to the button and open a popup.

I run it last November the test case and it worked perfect on iOS 13.0.
Few weeks ago I run the same test cases with iOS 13.0 and iOS 13.4.1 and I can’t open the popup.

My question is, there is a good way to work with the components inside the web view?

I tried with this lines of code and also recording the taps on the simulators.

XCUIApplication().webViews.webViews.textViews.buttons[" "].tap() //recorded on simulator

let tabButton = app.webViews.buttons.firstMatch
if tabButton.exists {

I’m not sure if something happened with the web view or with the CSS styles on the web page.

@bichoec Do you still have issues with this?

Yes @shogunkaramazov

I tried with different iOS version but it doesn’t work.

This topic was automatically closed after 166 days. New replies are no longer allowed.