2015-09-14 95 views
-1

我正在使用量角器來運行測試。它以隨機順序失敗,但並非總是如此,但是從6起5次失敗,並且出現類似的堆棧跟蹤。請有人幫助理解這個特徵,並找到問題出現的地方,有可能尋找並修復? 這裏是一個堆棧跟蹤:在量角器上運行測試時出錯(未知錯誤:未定義updateWindow)

 
[FAILED] 
UnknownError: unknown error: updateWindow is not defined 
JavaScript stack: 
ReferenceError: updateWindow is not defined 
at eval (eval at executeAsyncScript (unknown source), :2:9) 
at executeAsyncScript (:314:26) 
at apply.state (:330:29) 
at callFunction (:222:33) 
at apply.state (:232:23) 
at :233:3 at Object.InjectedScript.evaluateOn (:904:140) 
at Object.InjectedScript._evaluateAndWrap (:837:34) 
at Object.InjectedScript.evaluate (:693:21) 
(Session info: chrome=45.0.2454.85) 
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64) 
(WARNING: The server did not provide any stacktrace information) 
Command duration or timeout: 667 milliseconds 
Driver info: org.openqa.selenium.chrome.ChromeDriver 
Capabilities [{platform=WIN8, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=scoped_dir7276_31813}, rotatable=false, locationContextEnabled=true, version=45.0.2454.85, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}] 
at new bot.Error (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113:18) 
at Object.bot.response.checkResponse (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\response.js:106:9) 
at npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:377:20 
at [object Object].promise.ControlFlow.runInFrame (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1877:20) 
at [object Object].promise.Callback_.goog.defineClass.notify (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:2464:25) 
at [object Object].promise.Promise.notify_ (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:563:12) 
at Array.forEach (native) 
at Object.goog.array.forEach (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\array\array.js:203:43) 
at [object Object].promise.Promise.notifyAll_ (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:552:16) 
at goog.async.run.processWorkQueue (npm\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\async\run.js:125:21) 
From: Task: Asynchronous test function: it() 
at [object Object]. (npm\node_modules\protractor\node_modules\jasminewd\index.js:93:33) 
at [object Object]. (npm\node_modules\protractor\node_modules\minijasminenode\lib\async-callback.js:45:37) 
at [object Object].jasmine.Block.execute (npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:1174:17) 
at [object Object].jasmine.Queue.next_ (npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2209:31) 
at [object Object].onTimeout (npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2199:18) 
at Timer.listOnTimeout (timers.js:119:15) 
==== async task ==== Error 
at [object Object]. (loginSpec.js:3:5) 
at [object Object].jasmine.Env.describe (npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:913:21) 
at [object Object].jasmine.Env.describe (npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:898:15) 
at describe (npm\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:658:27) 
at Object. (loginSpec.js:1:63) 
at Module._compile (module.js:460:26) 
at Object.Module._extensions..js (module.js:478:10) 
at Module.load (module.js:355:32) 
at Function.Module._load (module.js:310:12) 
+2

你可以顯示你的代碼失敗的地方嗎?沒有查看您的代碼,我們無法提出任何建議。謝謝 –

+1

在代碼中查找名爲updateWindow的函數。當它被調用時,它沒有被定義。通常這是由於試圖在「this」對象上調用它造成的。 – MBielski

+0

我沒有函數和參數調用這種方式...它位於上方,然後我的代碼...我發現它在node_modules中的文件pako.js和pako_inflate.js ... –

回答

0

我沒有的功能和調用方式等參數......它`位於上部,然後我的代碼...我發現它在node_modules在文件pako.js和pako_inflate .js ...

相關問題