Selenium: IE7 won't start

I am getting an exception: "Failed to start new browser session: error starting browser"

when trying to run a test suite with IE7.

information:

  • python binding
  • Using cygwin

I tried doing "* custom path_to_browser" and even printing out the path to the browser directory in the do_command () function of the selenium module using os.listdir and could see the iexplore.exe file. So I know the right way to go.

I also tried setting localhost: 4444 in IE7 and that didn't work either. Any ideas?

+2


a source to share


2 answers


Use the new IWebDriver from Selenium v2 instead of Selenium RC. It will automatically find your browser executables (and now there is no need to launch a Java Selenium RC instance anymore!)



+1


a source


This will get you off the ground ...
I am using MINGW BASH on Windows XP SP3




(sorry, I can't get Markdown to display this as code, I backed out 4, then 8, phfhttt ...)

#!/c/Python27/python  

from selenium import webdriver  

driver = webdriver.Ie()
driver.get("http://seleniumhq.org")

all_elements = driver.find_elements_by_xpath("//*") # pretty slow in IE
for index, element in enumerate(all_elements):
    print "%03d element tag_name == %s" % (index, element.tag_name)

      

0


a source







All Articles