我正在測試使用angularjs編寫的應用程序。當我想用「文字輸入」關鍵字登錄,我得到異常:使用RobotFramework鍵入文字後的Webdriver異常
12:13:13.201 INFO Typing text '[email protected]' into text field '//label[contains(@ng-class,'username')]/input[@id='input-username']'
12:13:14.676 FAIL WebDriverException: Message: javascript error: $ is not defined
JavaScript stack:
ReferenceError: $ is not defined
at eval (eval at executeAsyncScript (unknown source), <anonymous>:2:366)
at Browser.self.notifyWhenNoOutstandingRequests (http://localhost:8000/app/bower_components/angular/angular.js:5757:7)
at eval (eval at executeAsyncScript (unknown source), <anonymous>:2:323)
at eval (eval at executeAsyncScript (unknown source), <anonymous>:2:439)
at executeAsyncScript (<anonymous>:329:26)
at apply.ELEMENT (<anonymous>:345:29)
at callFunction (<anonymous>:237:33)
at apply.ELEMENT (<anonymous>:247:23)
at <anonymous>:248:3
(Session info: chrome=52.0.2743.116)
(Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 10.0.10586 x86_64)
據較早前的工作正常,但現在仍然失敗。它可能是RF(庫)問題還是角?
我試着更新chromedriver和chrome,以及。
更多的事實:1。 一切正常與另一個應用本配置中, 2相同的配置運作良好的另一臺計算機, 3.我甚至無法在Firefox上運行它 - 我得到的消息:WebDriverException :消息:無法加載配置文件。配置文件目錄:%s如果您在FirefoxBinary構造函數中指定了一個log_file,請檢查它以獲取詳細信息。
也許這可能是由一些系統更新(Windows 10)引起的?但是,就像我剛纔提到的,其他應用程序的測試工作正常。
你用Firefox等其他瀏覽器試過嗎?錯誤來自Webdriver。 – Helio
@Helio,我甚至無法在Firefox上運行它 - 我得到的消息:ebDriverException:消息:無法加載配置文件。配置文件目錄:%s如果您在FirefoxBinary構造函數中指定了一個log_file,請檢查它以獲取詳細信息。更多的事實:1.在不同的應用程序上配置一切正常,2.相同的配置在另一臺計算機上運行良好。 – Zeebee