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.

1.5.3 - iOS - Switching to WebView context takes way too long (10+ seconds)

See original GitHub issue

The problem

I think this is a new issue that popped up in 1.5.1. I don’t think it happened in 1.4.16.

I have a WebView that opens up when I hit a button, and when I switch to the WebView context in iOS, it takes around 10 seconds. This is way too long for my test, and the events that I’m searching for already happen before the context gets done switching from native to webview. Any insight on how to fix it?

Thanks!

Environment

  • Appium version (or git revision) that exhibits the issue: 1.5.1
  • Last Appium version that did not exhibit the issue (if applicable): 1.4.16
  • Desktop OS/version used to run Appium: Mac 10.11.4
  • Node.js version (unless using Appium.app|exe): 5.9.0
  • Mobile platform/version under test: iOS 9.3 (happens for 9.2 also)
  • Real device or emulator/simulator: simulator
  • Appium CLI or Appium.app|exe: CLI

Details

The context switching works fine in Android and happens very fast. Just takes a very long time in iOS.

Link to Appium logs

https://gist.github.com/brtu/bcd85f559a07604bf1c21065497fcb7b

Code To Reproduce Issue [ Good To Have ]

Java client 3.4.1:

    Set<String> contextNames = driver.getContextHandles();
    driver.context((String) contextNames.toArray()[1]);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mahmoud-adam85commented, May 6, 2016

I have the same problem it takes too long time, even with 10 seconds some times it works and some times it does not work

1reaction
brtucommented, Apr 6, 2017

@jlipps i don’t believe this is a problem anymore in 1.6+. Closing this ticket

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS simulator - Switching to Webview Context takes a long ...
Switching to the webview on iOS simulator takes a l… ... 1.5.3 - iOS simulator - Switching to Webview Context takes a long...
Read more >
Xcode 12.5 very slow launch time for app in simulator
When running app in iOS 14.5 simulator launch takes incredibly long time (more than 30 seconds). In comparison launching installed app in simulator...
Read more >
Web Audio API - W3C
Abstract. This specification describes a high-level Web API for processing and synthesizing audio in web applications.
Read more >
appium | Yarn - Package Manager
Appium is an open-source, cross-platform test automation tool for native, hybrid, and mobile web and desktop apps. We support simulators (iOS), ...
Read more >
d - SVG: Scalable Vector Graphics - MDN Web Docs
For <path> , d is a string containing a series of path commands that define the ... 0 ) is usually the upper...
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