2016-07-28 95 views
0

我收到了此堆栈跟踪。无法发现打开的页面。无法在Chrome浏览器中从jenkins运行我的测试套件

Default Logging level is set to ERROR 
Loping for strBrowserType chrome 
Starting ChromeDriver (v2.9.248315) on port 42027 
Tests run: 32, Failures: 1, Errors: 0, Skipped: 31, Time elapsed: 67.337 sec <<< FAILURE! - in TestSuite 
setupSuite(com.ambab.carworkz.testcases.ServiceEstimatorTestTc) Time elapsed: 66.668 sec <<< FAILURE! 
org.openqa.selenium.WebDriverException: 
unknown error: unable to discover open pages 
    (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) 
Command duration or timeout: 61.06 seconds 
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' 
System info: host: 'ROBER-QA', ip: '192.168.0.70', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91' 
Driver info: org.openqa.selenium.chrome.ChromeDriver 

结果:

Failed tests: 
    ServiceEstimatorTestTc>Base.setupSuite:114 » WebDriver unknown error: unable t... 

Tests run: 32, Failures: 1, Errors: 0, Skipped: 31 

[ERROR] There are test failures. 

,我从在Chrome浏览器詹金斯这是当我面对这个问题的时候测试套件。如果我直接从eclipse IDE运行套件,那么它运行良好。当我在Firefox中运行相同的测试套件时,它也运行良好。

我已经安装了最新版本的chrome和chrome驱动程序。与maven运行jenkins工作。

尝试使用无沙箱以及铬浏览器设置自动检测设置的变化。詹金斯也是我在主人身上运行的工作,没有奴隶。尝试了每个可能的解决方案。如果有更多的解决方案,请让我知道。

+0

除非我失去了一些东西,ChromeDriver的最新版本应该是2.22,按照:https://开头sites.google.com/a/chromium.org/chromedriver/downloads – Josh

+0

@Josh我也使用了2.22以及..似乎没有任何工作。我在过去的2天里一直坚持这个!需要尽快解决这个问题!它吸吮太多时间.. –

+0

只是为了排除这种远程可能性,詹金斯也运行在Windows机器上,对吧? – Morfic

回答

0

我已经添加了这个东西,它解决了我的情况。也有可能是与运行詹金斯用户的问题(应该设置为管理员)

ChromeOptions options = new ChromeOptions(); options.AddUserProfilePreference("download.default_directory", DownloadsPath); options.SetLoggingPreference(LogType.Browser, LogLevel.Severe); options.AddArguments("ignore-certificate-errors"); options.AddArguments("--allow-running-insecure-content"); options.AddArguments("test-type"); options.AddArguments("start-maximized"); options.AddArguments("--disable-extensions"); options.AddArguments("no-sandbox"); var ChromeService = ChromeDriverService.CreateDefaultService(); ChromeService.HideCommandPromptWindow = true; instance = new ChromeDriver(ChromeService, options, TimeSpan.FromSeconds(200));

相关问题