这是WebDriver服务器的初始起始页 [英] This is the initial start page for the WebDriver server
问题描述
相同的代码在firefox中运行,但未在IE9中执行,并显示字符串消息这是WebDriver服务器的初始起始页".而在其他人上没有发现错误
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);
}
}
输出:- 启动InternetExplorerDriver服务器(32位) 2.37.0.0 在端口31651上侦听
Output:- Started InternetExplorerDriver server (32-bit) 2.37.0.0 Listening on port 31651
推荐答案
确保每个区域的保护模式设置值相同.引用 IE的必需配置.
Make sure you have same value of Protected Mode settings for each zone. Refere Required Configuration for IE.
更新:在您无权更改设置时,将ignoreZoomSetting
和ignoreProtectedModeSettings
功能设置为true
会有所帮助.
UPDATE: setting ignoreZoomSetting
and ignoreProtectedModeSettings
capabilities to true
helps when you don't have access to change settings.
如果您使用的是 qaf ,则可以设置以下功能:
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}
这篇关于这是WebDriver服务器的初始起始页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!