Selenium webdriver using IE browser

Source: Internet
Author: User

Iedriver plug-in: http://www.cr173.com/soft/195732.html

1. Configure the system environment variables.

My Computer--"right"--"Properties--" Advanced system settings--"Environment variables--" System variables--"path

Note: first put IEDriverServer.exe in C:\Program files\internet Explorer root directory, and then put this path in path.

  2. Turn off the Enable protected mode for IE

Open ie--"Settings-" Internet Options-"security-" remove the check before enabling protected mode

  Settings Note:

If you are the first to use RF to test on Internet Explorer, be sure to check the following settings:

1, the Security page of the IE option setting, the 4 zones of the enabled protected mode check are removed (or both)
2, the Internet Explorer option settings in the Connection page, LAN settings in the proxy server settings, cannot be checked. If you need to configure the proxy, use the proxy with the PAC Auto-configuration script above.
3, IE page display ratio of 100%
4. Download the IEDriverServer.exe file, place it in the directory of the path path to the environment variable, or add the directory where he is located to the PATH environment variable.
5, if the Internet Explorer settings security is high, do not select "Enable Protected mode" in the "Internet options" (Protected mode), or you may encounter error prompts.

Pros: Visually simulate the user's actual operation and provide complete support for JavaScript.

Cons: It is the slowest in all browsers and can only be run under Windows, and the support for CSS and XPath is not good enough.

Error during Operation Message:invalid capabilities in Alwaysmatch:unknown capability named Platform

Workaround: Delete platform, version, keys from, capabilities, dictionary

    • Code
 fromSeleniumImportWebdriver fromSelenium.webdriver.common.desired_capabilitiesImportdesiredcapabilities#Create Capabilitiescapabilities =Desiredcapabilities.internetexplorer#Delete platform and version keysCapabilities.pop ("Platform", None) Capabilities.pop ("version", None)#start an instance of IEDriver = Webdriver. Ie (executable_path="C:\\your\\path\\to\\iedriverserver.exe", capabilities=capabilities) Driver.get ("https://www.google.com/")

Selenium webdriver using IE browser

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.