Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using application with WKWebView elements are missing from PageSource #9408

Closed
NagyRobertt opened this issue Oct 9, 2017 · 7 comments
Closed

Comments

@NagyRobertt
Copy link

The problem

Using application with WKWebView elements are missing from PageSource.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.7.1
  • Desktop OS/version used to run Appium: Sierra 10.12.6
  • Node.js version (unless using Appium.app|exe): 6.9.1
  • Mobile platform/version under test: iOS 11.0.2
  • Real device or emulator/simulator: real device
  • Appium CLI or Appium.app|exe: cli

Details

We just recently started to support WKWebView and when i started the application with appium the page source got truncated and elements are not visible.
Before we were using UIWebview.

Attached screenshots of Inspector:
wkwebview
uiwebview

Link to Appium logs

In the log there were no errors visible. It says it got the page source. Simply the end result is incomplete.

Regards,
Robert

@mykola-mokhnach
Copy link
Collaborator

Appium desktop won't show webview content in scope of native context. You need to use the standard Apple's remote debugger feature to debug such views.

@NagyRobertt
Copy link
Author

Okay thank you.

Although i would like to clarify something. When i downloaded xcode 8 and plugged in a ios 10 device. The page source showed every element fine using either WKWebview or UiWebView. When i use xcode 9 and ios 11 i can only get the elements using page source with UiWebView. Does this have to do with the deprecation of Snapshot in Xcode? Is this going to mean from Xcode 9 i have to do somekind of workaround to get/call the elements using WKWebview?

@mykola-mokhnach
Copy link
Collaborator

This happened due to some changes Apple did there in Xcode9 SDK. Try to reach their engineers if you want to know more details.

@NagyRobertt
Copy link
Author

Never mind seems like our app had a bug, now it is fine. Sorry about that

@lokeshvunnam1989
Copy link

lokeshvunnam1989 commented Jan 23, 2018

@NagyRobertt I'm facing same issue. Not able to find WebElement. Can you help me in identifying an WebElement ?
I'm dealing with iOS Hybrid App, Xcode 9.1, iOS 11.0.
Using AndroidStudio, Java for Automation.

@chandrajeetvedadri
Copy link

Hi,
Im also facing the same issue while trying to identify the wkWebview elements in an ios app.
We are not able to identify these elements. Is there any workaround for this?
Any other solution please.. I'm currently stuck with my work here.. Need help..!!

Please note:
iOS Hybrid app, Xcode 9.2, iOS 11.2 version.

@lock
Copy link

lock bot commented Apr 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants