The word "Install" is inappropriate for selenium. Selenium provides some available library files for your selected programming language. You can download the Downloads page from this URL. Once you select a language to perform the test, you only need to do the following simple operations:
"Install" Selenium server;
Use one of the languages supported by the selenium library to write test programs.
Install selenium Server
Selenium Server is a common JAR file.
(Selenium-server-standalone-<version-number>. Jar. Download the ZIP file and put the server in the directory you want to reference.
Run selenium Server
Selenium server must be started before running any tests. Run the following command in the directory of the selenium-RC Server:
Java-jar selenium-server-standalone-<version-number>. Jar
For convenience, you can also create a batch processing file or shell executable file to run the server. (A. BAT file in windows and A. Sh file in Linux. Then, you can create a shortcut pointing to the startup Server File on the desktop. Double-click the shortcut on the desktop to start the server.
To ensure that the server runs properly, you must first install the Java environment and configure the correct path environment variable. Run the following command to check whether the Java environment has been correctly installed.
Java-version
If the Java version is correctly displayed (1.5 or the updated Java version is required), you are ready to start the server.
Use Java client driver
· Download selenium RC Java client Driver (downl page );
· Extract the selenium-Java-<version-number>. jar file from the downloaded file;
· Open the corresponding Java IDE (Eclipse, netbeans, intellij, NetWeaver, etc );
· Create a Java project;
· Reference the server JAR file to the project;
· Add the JAR file to the classpath of the project;
· Add the Java-format test script from selenium-ide To your test project, or compile the test script by referring to selenium-Java-client API. The API is described in the following sections. You can use JUnit or testng to run the test, or you can write a program that protects the main () method on your own to perform the test. The content will be described later.
· Start selenium server from the command line;
· Run the test program through Java-ide (eclipse) or command line.
For details about the configuration of the Java test project, refer to the relevant appendix:Processing ing
Selenium RC with eclipseAndProcessing ing
Selenium RC with intellij.
Use Python client driver
· Download selenium RC from the seleniumhq website downloads page;
· Extracts the selenium. py file;
· You can write your own Python program or export a test script in Python format from selenium-ide;
· Add the selenium. py file to the corresponding test path;
· Run the selenium server command line;
· Run the test program through the command line or Python IDE.
. Net client driver
· Download selenium RC from the seleniumhq website downloads page;
· Extracts directories;
· Download and install nunit (you can use nunit as the test engine. If you are not familiar with nunit, you can also write the common main method to run the test program. nuint is a very practical test engine)
· Open your own. Net IDE (Visual Studio, sharpdevelop, monodevelop );
· Create a class library (. dll );
· Add the DLL referenced to the following:
Nmock. dll, nuint. Core. dll, nunit. Framework. dll, thoughtworks. Selenium. Core. dll, thoughtworks. Selenium. intergrationtests. dll, thoughtworks. Selenium. unittests. dll
· Use the. NET language (C #, VB. NET) to write selenium test programs, or use selenium-ide To export C # code and add it to a self-created test project;
· Write your own common main method or run the test through nunit. The content will be described later;
· Start selenium server through the command line;
· Run the test program through the IDE, nunit interface, or command line.
For more information about. Net client driver and Visual Studio configuration, see the appendix.. Net
Client driver Configuration.
Use Ruby client driver
· You have not downloaded rubygems and rubyforge;
· Run the gem to install selnium-client;
· Add "selenium/client" to the top of the test script ";
· Use the ruby test suite to compile test scripts (such as test: Unit, mini: test or rspec );
· Start selenium RC Server through the command line;
· Run different Ruby scripts in the same way to execute your tests.
For more information about Ruby client dirver configuration, see selenium-client.
Documentation.
Reprinted from: http://www.testwo.com/space-1133-do-blog-id-4597.html