Woj
Woj

Reputation: 833

Xamarin UITest iOS can't reach webview elemtents

I seem to have an issue with detecting elements within webview on iOS, android seems fine.

enter image description here

When I call for tree to see visible items I get results, however whenever I try querying for any of the items I get no results. I have tried:

app.Query(c => c.WebView().Css("fullPage")) 
app.Query(c => c.WebView().Css("#fullPage")) 
app.Query(c => c.Marked("#userNameArea"))  
app.Query(c => c.Id(("#userNameArea"))

I also tried using xPath with the same result.:

app.Query(c => c.XPath("//userNameInput")) 

What am I doing wrong?

Upvotes: 0

Views: 1070

Answers (1)

Woj
Woj

Reputation: 833

For those of you who came across similar Issue on iOS you have to call for Class instead of WebView itself. In my case I had to do:

app.Tap(c => c.Class("BrandU_iOS_AuthenticatingWebViewRenderer").Css("#userNameInput"));

Upvotes: 1

Related Questions