1

I've setup webdriverio to run with FF and Chrome and all works fine.

I'm trying to run the same tests with http://webdriver.io/guide/services/iedriver.html.

It runs the first url command, but fails on the second run. E.g.:

browser.url('https://facebook.com'); //navigates to facebook
browser.url('https://google.com'); //fails on this line

Which throws:

Failed to navigate to http://google.com. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed. Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z' os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151' Driver info: driver.version: unknown running internet explorer

Any idea why and how to make this work?

EDIT: I've read IE11 Selenium WebDriverException: Failed to navigate. (org.openqa.selenium.WebDriverException ...IWebBrowser2::Navigate2() failed which didn't work for me

yccteam
  • 2,168
  • 4
  • 25
  • 47
  • You could do a workaround, to close nad open the tab again – pagep Nov 15 '17 at 13:21
  • This gives a different error: `Error: A request to switch to a different window could not be satisfied because the window could not be found.` – yccteam Nov 17 '17 at 04:45

2 Answers2

0

try

browser
.url('https://facebook.com') //navigates to facebook
.pause(5000)
.url('https://google.com') //fails on this line
  • This gives a different error: `Error: A request to switch to a different window could not be satisfied because the window could not be found.` – yccteam Nov 16 '17 at 08:26
  • well this looks like a webdriver.io or selenium bug. Because how you write and how I write it are the correct ways to open different urls in a row. Also dude why IE :D Those bugs always appears on webdrivers that nobody really use like safari or IE. Use chrome or firefox and you will be fine. – ピンク フィリペ ピン Nov 16 '17 at 18:43
  • Alternative you can try to create a new tab and then use http://webdriver.io/api/window/switchTab.html to switch to it. Read the complete windows category on the bottom left. There is everything you need. – ピンク フィリペ ピン Nov 16 '17 at 18:46
  • I've tried the switch tab trick yesterday. It also gives an error (it says it cannot find the window...). I'm aware of the fact that IE is... problematic. But alas, we have to support IE users, so the E2E with IE is very important to find IE related bugs. Thanks :) – yccteam Nov 17 '17 at 04:40
0

Try adding the domain to the trusted sites as stated here: https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/6511#issuecomment-192149766

Just go to IE Settings->Internet Options->Security->Trusted Sites->Sites