软件版本: jenkins version 1.478 selenium Standalone version 2.25 chrome driver version Chrome version 21 PHPunit 3.6.10 PHP webdriver bindings http://code.google.com/p/php-webdriver-bindings/ Ubuntu 11.10 使用GUI
摘要: 在一个新的终端窗口中我运行: java -jar selenium-server-standalone-2.25.0.jar -Dwebdriver.chrome.driver=chrome_driver
当作为 ant PHPunit 任务的一部分运行时,PHPUnit/webdriver 测试运行良好。Chrome 出现、页面加载、点击发生等。浏览器在 tearDown() 时关闭。
但是,当 jenkins 运行 ant phpunit 构建任务时。出现以下情况。Chrome 浏览器打开。出现第一个网页,发送密钥工作,提交表单。但浏览器窗口似乎没有关闭。它挂起。詹金斯构建无限期挂起。我需要杀死构建。
关于为什么硒测试在命令行上工作而不是来自詹金斯的任何想法?
谢谢杰米
更新:似乎 webdriver 点击。Selenium 停止/挂起并且不再接受命令。
IE
$element = $this->webdriver->findElementBy(LocatorStrategy::xpath, "/html/body/div[5]/div[3]/div[2]/ul/li[2]/a"); $元素->点击();
//此行以下不执行。$element2 = $this->webdriver->findElementBy(LocatorStrategy::xpath, "/html/body/div[5]/div[10]/div[2]/ul/li[2]/a"); $element2->点击();
更新 2:我已经用这个替换了 PHP webdriver 绑定:
https://github.com/Element-34/php-webdrivergs这个版本:
一些进展。测试 webdriver/phpunits 测试执行并完成。然而,詹金斯 PHPUnit 构建步骤仍然永远挂起。