webdriver.switchTo().defaultContent() triggers System.InvalidOperationException in IE9

StackOverflow https://stackoverflow.com/questions/9116682

  •  21-04-2021
  •  | 
  •  

I'm using Selenium 2.15 to drive IE9. Overall, it's been working fine. I've got a weird scenario where a: driver.SwitchTo().DefaultContent() is triggering a System.InvalidOperationException (the message is "Unable to get browser (NoSuchDriver)"). I'm quite certain the browser is up and running, and has in fact driven to the content requested. The content in question is a single line HTML doc:

<div id='me'>simple page</div>

Is there any reason why SwitchTo().DefaultContent() would fail on such a page?

没有正确的解决方案

其他提示

Aha, I figured it out. It's the known Selenium webdriver IE protected zone issue. The trick is, you have to UNcheck protected mode for all 4 zones. Then, implicitly, protected mode is disabled for "local machine" zone, which fixes the problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top