My selenium RC jav开发者_StackOverflow社区a code is running successfully on firefox. Can anyone tell me how to run the same test case on internet explorer?
Change the browser start command string you pass to DefaultSelenium factory. It will be *iehta or *iexplore depending on your selenium version.
new DefaultSelenium("localhost", 4444, "*iexplore", "http://www.google.com/");
Check out the docs for more info.
--Sai
Just replace *firefox
with *iexplore
. The exact code will vary depending on what language you're writing your test in or how you're actually launching the browser.
see: http://seleniumhq.org/docs/05_selenium_rc.html#from-selenese-to-a-program and click the button for your particular language.
If you hit the Script error while running tests on IE with selenium RC, it might be because of not running the selenium server with Administrator privileges. I had the similar issue and could get it running with by running the selenium server as an Administrator
Very simple: Use "*iexplore" instead of "*firefox"
In order to work the scripts on IE do the following steps
1.Navigate to ToolsInternet OptionsSecurityTrusted Sites
2.Click on “Sites” button and add the Urls of the application you are testing in “Add this website to the zone:” and clicking on “Add” button.
3.Navigate to ToolsInternet OptionsSecurity and disable the checkbox “Enable Protected Mode (requires restarting Internet Explorer)” and click on “Apply” and click “Ok”.
a. Navigate to ToolsInternet OptionsSecurity b. Add all the URL’s of your application in the “Address of websites to allow” and click on “Add” button.
Navigate to ToolsInternet OptionsAdvanced options. Scroll down to the Security section, and select Allow active content to run in files on my computer. This will get rid of the pesky toolbar alert, and allow JavaScript to run automatically.
精彩评论