我在iOS上检测webview中的元素似乎有问题,android看起来不错。
当我调用tree来查看可见项时,我会得到结果,但是每当我尝试查询任何项时,都不会得到结果。我试过:
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"))
app.Query(c => c.XPath("//userNameInput"))
我做错什么了?
对于那些在iOS上遇到类似问题的人,您必须调用类而不是WebView本身。在我的情况下,我必须:
app.Tap(c => c.Class("BrandU_iOS_AuthenticatingWebViewRenderer").Css("#userNameInput"));