我正试图在詹金斯运行硒。当我在本地运行时,测试总是通过。但在詹金斯,我总是得到错误:
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@ee7d9f1
Starting ChromeDriver 2.34.522932 (4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e) on port 10010
Only local connections are allowed.
Dec 18, 2017 2:35:43 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
File cannot be found
Tests run: 4, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 6.807 sec <<< FAILURE!
没有这样的元素:无法找到元素:
我正在使用Jenkins,Selenium和Testing
答案 0 :(得分:1)
This issue is related to your mac, and is a connection issue to other server on which you are running your script. for resolving this issue please read this: https://discussions.apple.com/thread/1789752