Selenium test with Python in Internet Explorer

前端 未结 3 1948
遇见更好的自我
遇见更好的自我 2020-12-30 11:10

I have written a script that opens a web browser using python and Selenium. It works fine with Firefox using the following code:

from selenium import webdriv         


        
3条回答
  •  忘掉有多难
    2020-12-30 11:58

    1. Download IE Drivers based on your OS (Windows 32 or 64 bit)

      a. Download Windows 32 bits driver

      OR

      b. Download Windows 64 bits driver

    2. Extract the zip and copy IEDriverServer.exe file to some location e.g. E:\IEDriver

    3. Write the following script

      from selenium import webdriver
      browser = webdriver.Ie("e:\\IEDriver\\IEDriverServer.exe")
      
    4. Run the script, it should open IE browser...

提交回复
热议问题