[英]"This is the initial start page for the WebDriver server" - Unable to resolve in Selenium/Python program using IE 11
After running my Selenium/Python program, browser opened with below message:运行我的 Selenium/Python 程序后,浏览器打开并显示以下消息:
This is the initial start page for the WebDriver server
I have done below steps to resolve this:我已完成以下步骤来解决此问题:
In IE Options -> Security tab, Enable Protected Mode check box is ticked OFF in all zones: Internet, Local Intranet, Trusted sites and Restricted sites.在 IE 选项 -> 安全选项卡中,所有区域中的启用保护模式复选框都被勾选为关闭:Internet、本地 Intranet、可信站点和受限站点。 Also, in Advanced tab -> Security, ticked OFF the check box: "Enable Enhanced Protected Mode" (Also, I tried with enabling this Protected Mode in all zones and in Advanced tab too).
此外,在高级选项卡 -> 安全性中,勾选复选框:“启用增强保护模式”(此外,我也尝试在所有区域和高级选项卡中启用此保护模式)。
My IEdriver (version 3.1.4) and Selenium web driver (version 3.1.4) are compatible (both are on same version)我的 IEdriver(版本 3.1.4)和 Selenium Web 驱动程序(版本 3.1.4)兼容(两者都在同一版本上)
I tried above two, still I am getting the same message.我尝试了以上两个,但仍然收到相同的消息。
I have added below content to ignore Protected mode:我添加了以下内容以忽略保护模式:
caps = DesiredCapabilities.INTERNETEXPLORER
caps['ignoreProtectedModeSettings'] = True
driver = webdriver.Ie(executable_path='C:/Selenium/Drivers/IEDriverServer.exe',capabilities=caps)
Still, I am getting the same message after adding above code.不过,在添加上述代码后,我收到了相同的消息。
Any ideas?有任何想法吗? Please help.
请帮忙。
This is as per design.这是按照设计。 When
IEDriverServer.exe
opens a new a new Browsing Context ie Internet Explorer browsing session it navigates first to this page.当
IEDriverServer.exe
打开一个新的浏览上下文即Internet Explorer浏览会话时,它首先导航到此页面。
Once you initialize the browser through the line:通过以下行初始化浏览器后:
driver = webdriver.Ie(executable_path='C:/Selenium/Drivers/IEDriverServer.exe',capabilities=caps)
next you can invoke the get()
command to access any url.接下来您可以调用
get()
命令来访问任何 url。 As an example:举个例子:
driver.get('https://www.google.com/')
Additionally you need to:此外,您需要:
Note : As per best practices as Selenium Client and InternetExplorerDriver are released in sync and you must try to use both the binaries from the same major release.
注意:根据最佳实践, Selenium Client和InternetExplorerDriver是同步发布的,您必须尝试使用同一主要版本中的两个二进制文件。
@Test
.@Test
。driver.quit()
within tearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully.tearDown(){}
方法中调用driver.quit()
以优雅地关闭和销毁WebDriver和Web Client实例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.