In Windows cmd execute "python test.py", no problem, the browser open normally, the test results are normal.
Problem:
But if it is in Jenkins, choose "Execute Windows Batch command", configure "Python test.py" run test, this time there will be a problem, Chrome browser will not open, but there are processes in the background, Test.py runs in the background, but runs test.py in the background and the browser does not open.
For such a problem, the workaround:
1) Using administrator permissions, execute SC Delete Jenkins to remove Windows service
2) Restart your computer
3) Use administrator permissions, cmd mode input: Java-jar Jenkins.war to start Jenkins (this requires re-creating the Jenkins Job) (Jenkins.war need to download the appropriate version from the Jenkins website)
This will solve the problem of the browser display, while using the same method as above can solve the problem due to Jenkins or browser permissions, resulting in the issue, as follows:
Exception:unknown error:unable to discover open pages.
Over.
Jenkins run Selenium Webdriver,chrome browser cannot open &&unknown error:unable to discover open pages