我不能解決爲什麼我的基於網絡的黃瓜測試永遠不會終止。所有步驟定義都會通過,但瀏覽器從不退出最後一步,因此我的腳本被掛起。我cuke4duke測試掛起,並永不終止
我目前正在運行的cuke4duke(0.4.3),蓋布(0.5.1),行家(2.2.1),硒Firefox的驅動器/硒,鉻驅動器(2.0a6和a7)
我已經在Chrome和Firefox(3.6)/ Windows XP和Ubuntu上測試了我的腳本,沒有任何成功。
這裏是我的Maven輸出建立
[INFO] Scenario: Navigate from homepage # features/helppage.feature:7
[INFO] Given I am on the homepage # [email protected]
[INFO] When I click on the about page # [email protected]
[INFO] Then the title should display "About Google" # [email protected]
[INFO]
[INFO] 1 scenario (1 passed)
[INFO] 3 steps (3 passed)
[INFO] 0m5.421s
HANGING HERE
Env.groovy
import geb.Browser
import org.openqa.selenium.chrome.ChromeDriver;
this.metaClass.mixin(cuke4duke.GroovyDsl)
Before() {
new Browser(new ChromeDriver(),'http://www.google.com')
}
After() {
clearCookies()
}
helppage.groovy
this.metaClass.mixin(cuke4duke.GroovyDsl)
Given (~/I am on the homepage/) {
go('/')
}
When (~/I click on the about page/) {
go('/intl/en/about.html')
}
Then (~/the title should display "(.*)"/) { pageTitle ->
assert title == pageTitle
}
我不能,如果該問題制定出是在webdriver或cuke4duke發行版或其他任何地方。我也不確定如何將更多調試添加到Maven構建中,以便找出發生了什麼問題。
我現在有類似的問題。設置:在步驟定義中使用webdriver(selenium)的Cucumber/cuke4duke。所有的web驅動程序都正常工作(IE,HTMLUnit,firefox),但在所有測試完成後,chromedriver與您的示例完全相同。 @swedstar:你在這個問題上有什麼進展嗎? – 2011-07-06 13:30:49