Jenkins build Selenium Python (browser driver is chromedriver) workaround

Source: Internet
Author: User
Tags java web selenium python

1. Enter chrome://version in Chrome Browse to see where Chrome is installed

2. Add the Chromedriver driver to the executable file path

3. In the system settings in Jenkins-environment variables-Add a python environment like windows

4. Modify the script to add the absolute path to the driver

5. Build Jenkins results again OK

6. Script execution Interface-free workaround

Cause: After Jenkins is built, the node that runs the automation case by default is the server that Master,master starts Jenkins, and running the case on master is usually the background process. So some classmates will wonder why the script can not see the running interface with Jenkins run. If you want to see a running interface, you need to add a slave node, especially if there are multiple machines that need to be plugged into Jenkins to execute a case, you need to add a node

1. In the System administration-management node. You can see that there is currently only one master

   

2, click on the right to create a new node, fill in the information as follows, save. "description" The remote working directory is a local jenkins-workpace;

2.1 If the startup method does not have Java Web steps as follows

1: Open "System Management"--"Configure Global Security"

2:TCP Port JNLP agents configured to "random", click on "Agent protocols", tick Open "Java Web start Agent Protocol3"

3: Check "Enable Slave" in Plugin manager to tick

:

Click on "Agent protocols" security policy to turn on "Java Web Start Agent Protocol3"

Check "Enable Slave" in "Plugin Manager" to tick

Save it and save the following options:

3. You can see the new robot node at this time, but the status is shown in red X, indicating the node or off line

  

4, click the node robot, the detail interface shows several ways to start the node.

Step one, click the launch button to download a SLAVE-AGENT.JNLP file.

Step two, download the Slave.jar download jar package and put it in the specified directory.

Step three, copy the instructions of the interface, open the cmd window, enter the command.

Step four, refresh the current page, note the download of Agent.jar and cmd command format Java-jar find the downloaded Agent.jar in the wrong node with the prompt command

  

5. View the Jenkins interface to see the discovery Agent build online.

  

6. The configuration item restricts the running node of the project to the new node name.

  

Jenkins build Selenium Python (browser driver is chromedriver) workaround

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.