Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This is the initial start page for the WebDriver server

same code is running in firefox but it is not executing in IE9 and displaying the String message "This is the initial start page for the WebDriver server." while no error found on others

        public void setUp() throws Exception {

    File file = new File("C:/Users/Sunil.Wali/Desktop/Softwares/IEDriverServer_Win32_2.37.0/IEDriverServer.exe");
    System.setProperty("webdriver.ie.driver", file.getAbsolutePath());

    driver = new InternetExplorerDriver();
    // driver = new FirefoxDriver();

    baseUrl = "https://tssstrpms501.corp.trelleborg.com:12001";
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
      @Test
public void testLogin() throws Exception {
    driver.get(baseUrl + "/ProcessPortal/login.jsp");
    driver.findElement(By.id("username")).clear();
    driver.findElement(By.id("username")).sendKeys("sunil.wali");
    driver.findElement(By.id("password")).clear();
    driver.findElement(By.id("password")).sendKeys("Trelleborg@123");
    driver.findElement(By.id("log_in")).click();
    driver.findElement(By.id("processPortalUserDropdown")).click();
    driver.findElement(By.id("dijit_MenuItem_56_text")).click();
}

@After
public void tearDown() throws Exception {
    driver.quit();
    String verificationErrorString = verificationErrors.toString();
    if (!"".equals(verificationErrorString)) {
        fail(verificationErrorString);
    }
}

Output:- Started InternetExplorerDriver server (32-bit) 2.37.0.0 Listening on port 31651

like image 986
Sunil wali Avatar asked Nov 14 '13 13:11

Sunil wali


People also ask

Which is default browser for WebDriver?

#3) Mozilla Firefox Driver It is the default driver that Selenium WebDriver supports.

What is a WebDriver session?

WebDriver is a remote control interface that enables introspection and control of user agents. It provides a platform- and language-neutral wire protocol as a way for out-of-process programs to remotely instruct the behavior of web browsers.


2 Answers

Make sure you have same value of Protected Mode settings for each zone. Refere Required Configuration for IE.

UPDATE: setting ignoreZoomSetting and ignoreProtectedModeSettings capabilities to true helps when you don't have access to change settings.

If you are using qaf you can set capabilities as below:

driver.name=iexplorerDriver
iexplorer.additional.capabilities={'ignoreProtectedModeSettings':true,'ignoreZoomSetting':true,'nativeEvents':false,'acceptSslCerts':true}
like image 183
user861594 Avatar answered Nov 23 '22 18:11

user861594


  • On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
  • Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.

http://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration

like image 20
user3758108 Avatar answered Nov 23 '22 19:11

user3758108