[英]So when I run my python selenium script through jenkins, how should I write the 'driver = webdriver.Chrome()'?
So when I run my python selenium script through Jenkins, how should I write the driver = webdriver.Chrome()
因此,当我通过Jenkins运行python硒脚本时,应该如何编写driver = webdriver.Chrome()
How should I put the chrome webdriver EXE in jenkins? 我应该如何将Chrome webdriver EXE放入jenkins?
Where should I put it? 我应该放在哪里?
If you have added your repository path in jenkins during job configuration, Jenkins will create a virtual copy of your workspace. 如果您在作业配置期间在jenkins中添加了存储库路径,则Jenkins将创建工作空间的虚拟副本。 So, as long as the webdriver file is somewhere in your project folder structure and as long as you are using relative path to reference it in your code, there shouldn't be any issues with respect to driver in invocation. 因此,只要webdriver文件位于项目文件夹结构中的某个位置,并且只要您使用相对路径在代码中对其进行引用,就不会在驱动程序调用方面出现任何问题。
You question also depends on several params like: 1. Whether you are using Maven to run the test 2. Whether you are running tests on Jenkins locally or on a remote machine using Selenium Grid Architecture. 您的问题还取决于几个参数,例如:1.是否使用Maven运行测试2.是在Jenkins本地还是在使用Selenium Grid Architecture的远程计算机上运行测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.