In the Open browser of the Selenium2library library, there are several less commonly used parameters in addition to the url,browser we commonly use. Such as: The use ofRemote_url
1. Download the Selenium-server-standalone-xxxx.jar Package
Https://code.google.com/p/selenium/downloads/list serarch selection: All Downloads
Select: Selenium-server-standalone-2.39.0.jar version.
2. Install the Java+python environment on the child nodes and configure the environment variables
3. Start the master node, that is, deploy the ride+framework+selenium2library environment
Enter commands at the command line Java-jar selenium-server-standalone-2.39.0.jar-role hub
Default boot default port is 4444, of course, you do not like 4444 can also change the port, plus-port xxxx can
When you're done, you can open http://localhost:4444/grid/console with your browser to see the status of the master node.
4. Start a child node
Now I have another machine as a child node (the master node can also be a child node). Same Open command
Java-jar selenium-server-standalone-xxxx.jar-role Node-hub Http://192.168.XX.XXX:4444/grid/register
Where 192.168.xx.xxx the IP address of the primary node, you can use the ipconfig command to view it at the command line. The above command starts port 5555 by default and can be changed using-port. Other parameter settings see for yourself, Https://code.google.com/p/selenium/wiki/Grid2.
You can then enter the Http://localhost:4444/grid/console URL on the master node to see the status of this child node.
5. After the deployment is complete, make the Test call in ride:
Open Browser URL gc remote_url=http://192.168.x.x:5555/wd/hub
OK, run it, no accident, the child node browser will be up!
6. Precautions:
The child node of the computer must also have a corresponding browser Driver,driver address must also be in path
Selenium2library using Remote function (reprinted and updated)