# XCUITest with WKWebViews

**URL:** <https://forums.kodeco.com/t/xcuitest-with-wkwebviews/109141>\
**Category:** Swift\
**Created:** [May 15, 2020, 9:09pm UTC](https://forums.kodeco.com/t/xcuitest-with-wkwebviews/109141 "2020-05-15T21:09:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bichoec](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bichoec/32/92712_2.png) [@bichoec](https://forums.kodeco.com/u/bichoec)\
**Post date:** [May 15, 2020, 9:09pm UTC](https://forums.kodeco.com/t/xcuitest-with-wkwebviews/109141/1 "2020-05-15T21:09:25Z")

</div>

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 {
    tabButton.tap()
}

```

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

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 6, 2020, 10:47pm UTC](https://forums.kodeco.com/t/xcuitest-with-wkwebviews/109141/3 "2020-07-06T22:47:09Z")

</div>

@bichoec Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![bichoec](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bichoec/32/92712_2.png) [@bichoec](https://forums.kodeco.com/u/bichoec)\
**Post date:** [July 29, 2020, 5:04pm UTC](https://forums.kodeco.com/t/xcuitest-with-wkwebviews/109141/4 "2020-07-29T17:04:59Z")

</div>

Yes @shogunkaramazov

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

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [October 29, 2020, 1:12pm UTC](https://forums.kodeco.com/t/xcuitest-with-wkwebviews/109141/5 "2020-10-29T13:12:40Z")

</div>

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