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