0
我使用WebDriver運行Arquillian Graphene(2.0.0.Alpha3),結果不一致。最喜歡的問題發生與請求後衛如何使用Arquillian Graphene持續測試AJAX?
12:13:29.667 WARN - Exception thrown
org.openqa.selenium.WebDriverException: ReferenceError: Graphene is not defined
Command duration or timeout: 946 milliseconds
Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 20:21:18'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_30'
Session ID: 6dce0406-d50d-46d9-8e28-01f159a593b7
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=10.0.12, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:533)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:441)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
at $Proxy1.executeScript(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:167)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
看來:有時,我的JUnit測試將通過沒有問題,其他時間我會得到象這樣的錯誤。例如:
guardXhr(_acceptButton).click();
可能是什麼原因?有沒有辦法調試或解決這個問題?
看起來像這是石墨烯的潛在錯誤:[ARQGRA-262](https://issues.jboss.org/browse/ARQGRA-262) –