I am unable to start Microsoft Internet Explorer browser to perform my selenium s/w automated tests created in Java. I am utilizing Windows 7 and IE 9. Below is my code:

It must establish same Safety degree in all zones. To accomplish this follow the steps below:

public class GoogleNews {
private WebDriver driver;
private String baseUrl;
private StringBuffer verificationErrors = new StringBuffer();
ArrayList al = new ArrayList();
@Before
public void setUp() throws Exception {
//driver = new FirefoxDriver();
driver =new InternetExplorerDriver();
baseUrl = “https://news.google.co.in/”;

}

@Test
public void testApple() throws Exception {
driver.get(baseUrl);
}
}

Available IE
Visit Resources -“>> Web Options -“>> Security
Place all areas (Internet, Neighborhood intranet, Trusted sites, Limited websites) to the exact same guarded setting, enabled or disabled shouldn’t issue.
Eventually, establish Zoom amount to 100% by right hitting kit situated at the top right part and empowering the status bar. Default zoom level is currently shown at the lower right.

Nicely as the stack track states, you’d have to establish the protected mode options to same for most areas in INTERNET EXPLORER. Examine the why here : http://jimevansmusic.blogspot.in/2012/08/youre-doing-it-wrong-protected-mode-and.html

and a fast how to from an identical hyperlink : “In INTERNET EXPLORER, in the Equipment menu (or the tools symbol in the toolbar in later variants), choose “Web options.” Visit the Protection tab. At the end of the dialogue for each area, you should notice a checkbox labeled “Enable Protected Mode.” Establish the value of the checkbox to exactly the same value, both checked or unchecked, for every area”

This bit of WebDriver Java signal should function to start MICROSOFT INTERNET EXPLORER. The signal may blow off the set up of Protected setting options for all area in the Microsoft Internet Explorer browser.

DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
File file = new File(“D:\\Ripon Al Wasim\\IEDriverServer.exe”);
System.setProperty(“webdriver.ie.driver”, file.getAbsolutePath());
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get(“https://www.google.com/”);

Download IEDriverServer and pull it into your desired place and place the complete path (within my above illustration it was “D:Ripon Ing WasimIEDriverServer.exe”)

DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
File fil = new File(“iDrivers\\IEDriverServer.exe”);
System.setProperty(“webdriver.ie.driver”, fil.getAbsolutePath());
WebDriver driver = new InternetExplorerDriver(capabilities);
driver.get(“https://www.irctc.co.in”);

Move to MICROSOFT INTERNET EXPLORER-“>>Resources-“>>Internet Options.
Visit Protection tab.
Possibly Enable/Eliminate the protected mode for most( Internet, Neighborhood Intranet, Trusted Sites & Limited Websites.)

Leave a Reply

Your email address will not be published. Required fields are marked *