Search code examples
internet-explorerseleniumselenium-webdriverwatir-webdriverdeveloper-tools

Developers tool(F12) is opening in Internet Explorer when it is launched by watir-webdriver


I am automating a web application on Internet Explorer using Watir-webdriver and ruby. When I run my script in my Laptop[Win7(x64) and IE11] it is running without opening Developers Tool in Internet explorer. But When I test the same script in Virtual Machine[Win8(x64) and IE10], Intenet Exploerer browser opening with Developer tool. Anyone has an idea, why this is happening? I'm using below code to launch the browser:

Selenium::WebDriver::Remote::Capabilities.ie(:ignoreProtectedModeSettings => true)
browser = Watir::Browser.new :ie

Solution

  • When opening Internet Explorer, the Developer Toolbar state will be the same as when IE was last closed. In other words, the Developer Toolbar will be open if it (the toolbar) was open when IE was last closed.

    Try:

    1. Log into the Virtual Machine
    2. Manually open Internet Explorer, which will automatically have the Developer Toolbar open
    3. Close the Developer Toolbar
    4. Close the browser

    The next time IE is started, whether manually or via Webdriver, the toolbar should be closed.