question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot recognize webview context on iOS 13

See original GitHub issue

The problem

I saw that @imurchie published his code into latest beta version in #13285 , but I’m still stuck at switching into the webview context. I managed to see the webview on Safari developer menu image

Environment

  • appium@beta
% npm list -g appium-remote-debugger
/usr/local/lib
`-- appium@1.16.0-beta.1
  +-- appium-ios-driver@4.4.0
  | `-- appium-remote-debugger@4.5.0 
  +-- appium-xcuitest-driver@3.6.1
  | `-- appium-remote-debugger@6.7.0 
  `-- appium-youiengine-driver@1.2.1
    `-- appium-xcuitest-driver@2.133.1
      `-- appium-remote-debugger@5.7.0 

% npm --versions
{
  npm: '6.13.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.4',
  modules: '72',
  napi: '5',
  nghttp2: '1.39.2',
  node: '12.12.0',
  openssl: '1.1.1d',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.32.0',
  v8: '7.7.299.13-node.12',
  zlib: '1.2.11'
}
  • Mac 10.15.1 & Xcode Version 11.2.1 (11B500)
  • iOS 13.2.3 (iPhone 6s)

Link to Appium logs

See this gist log

Code To Reproduce Issue

Just call to get the available contexts (see more in log)

GET /wd/hub/session/54f250eb-5274-4a3a-92f9-0a6b1e65d5e5/contexts

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
trinhphamcommented, Nov 22, 2019

Thank @mykola-mokhnach , latest beta can recognize my webview. You can see the log here

% npm list -g appium-remote-debugger
/usr/local/lib
`-- appium@1.16.0-beta.2
  +-- appium-flutter-driver@0.0.20
  | `-- appium-xcuitest-driver@2.133.1
  |   `-- appium-remote-debugger@5.7.0 
  +-- appium-ios-driver@4.4.0
  | `-- appium-remote-debugger@4.5.0 
  `-- appium-xcuitest-driver@3.7.0
    `-- appium-remote-debugger@7.0.0 
0reactions
imurchiecommented, Nov 21, 2019

@trinhpham Can you try re-installing the beta?

$ npm ls -g appium-remote-debugger
/Users/isaacmurchie/.nvm/versions/node/v10.16.3/lib
└─┬ appium@1.16.0-beta.1
  ├─┬ appium-ios-driver@4.4.0
  │ └── appium-remote-debugger@4.5.0
  └─┬ appium-xcuitest-driver@3.7.0
    └── appium-remote-debugger@7.0.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find WEBVIEW context with iOS 13 · Issue #14178
The problem I am unable to find WEBVIEW context using driver.contexts. It only shows ['NATIVE_APP'] using get_all_context.
Read more >
Context cannot find webviews on 1.3.1 on iOS - Issues/Bugs
I am unable to find webviews using context. Set<String> contextNames =webDriver.getContextHandles(); System.out.println(contextNames.size()) ...
Read more >
Cannot find WebViewContext for WkWebView on iOS ...
I have an ios app that first starts the webview directly. When I then try to switch the context, Appium doesn't find the...
Read more >
WKWebView | Apple Developer Documentation
A web view supports a full web-browsing experience, and presents HTML, CSS, and JavaScript content alongside your app's native views.
Read more >
I'm only able to see NATIVE_APP context, how do I get ...
Often, during an automated iOS test, it could be helpful to use WEBVIEW contexts in order to faster execute your tests. WEBVIEWs load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found