0

I am running my tests on browserstack and for IE 11 I am getting following error when it tries to find element.

The same test runs successfully in IE 10.

Code:

wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("label[for='form:quest:0:quest:0:questionId:0']")));

Exception:

org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window

I came across following post while trying to find the solution, however unsure how to set this capability in browserstack.

Selenium - NoSuchWindowException in IE 11

Community
  • 1
  • 1
Gaurang
  • 171
  • 1
  • 14

1 Answers1

1

This error is specific to the IEDrvier itself, while interacting with IE browsers. BrowserStack has added the following capability to fix the issue:

"browserstack.bfcache" = "0"

  • I tried it however, it's not working. I have now capabilities set as you mentioned. `capabilities.setCapability("browserstack.bfcache", "0");` – Gaurang Feb 20 '17 at 10:20
  • If the capability does not work then you should contact BrowserStack's support team. May be share the session details with them. – Mukesh Tiwari Feb 20 '17 at 12:57