Run test Suite from the command line with selenium RC

Source: Internet
Author: User
Origin

Recent project teams are testing using the Selenium IDE and selenium RC. Learn a few days, from the Internet search materials, feel that the document is really too little, (free Open-source software, alas ...). , the official web site on a Selenese Command reference is more formal and comprehensive documents, the other few. The Selenium RC documentation simply introduces the parameters used to run from the command line, and there is no corresponding example.

A few days ago, you used the Selelium IDE to record test scripts, run your test scripts, and tests suite, and then use the selenium RC to run the test suite from the command line. Originally saw the Selenium RC document, thought that a command can be done, is not a

Java selenium-server.jar-htmlsuite "*firefox" "http://..." "C:/testsuite.html" "c:/result.html"

Why (about the significance of the parameter-htmlsuite four parameters, do not repeat here, the official online this is still some.) But this simple command has been unsuccessful on my machine, always prompting for page faults or not. Hold up the n days, really the first big ~ ~ Finally, with the help of SDM to get this done. reason

The original proxy server to blame, Selenium RC to successfully run the browser to configure the proxy server, but if you just run test Suite with the above command, Selenium RC will start an initialized Firefox browser (that is, without any configuration of the browser, Of course, it does not include proxy server settings). Without a proxy server, Selenium RC is certainly not running successfully. Solve

Know why, the solution is simple, with an additional parameter-firefoxprofiletemplate is done, so the entire command is:

Java selenium-server.jar-htmlsuite "*firefox" "http://..." "C:/testsuite.html" "c:/result.html"-firefoxprofiletemplate "C:/Documents and Settings/administrator/application Data/mozilla/firefox/profiles/myprofile "

(The location of the Firefox profile file here needs to be noted under "C:/Documents and Settings/administrator/application Data" instead of "c:/documents" and Settings/administrator/local settings/application Data ", otherwise it will not run successfully. )

Reference Resources

The sad website

More useful Selenese Command reference

Focuses on how to run selenium RC from the command line in a interactive way

Documents related to Selnium RC (from the home page is not easy to find)

Can be a special Firefox profile for Selenium RC, here are explained

@ Basketball Baby

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.