私は、アプリケーションのテストにSelenium chromewebdriverを使いたいと思います。Selenium JS Chrome Webdriverを使用しているエラー
が、私はこのチュートリアルで開始しました:私は、最新のwebdriver
をダウンロードしてパスに追加してhttps://code.google.com/p/selenium/wiki/WebDriverJs#Getting_Started
、その後、私はあなたが始めるの下で見たサンプルコードを実行しようとしました。私は、スクリプトにコードを追加し、> node script.js
でそれを実行しようとしたし、次のエラーメッセージました:バグ@version 2.48.0があり
undefined:1178
vlog(2,() => this + ' scheduling notifications', this);
^
SyntaxError: Unexpected token)
at goog.loadModuleFromSource_ (C:\nodescripts\node_modules\selenium-webdriver\lib\goog\base.js:1123:19)
at Object.goog.loadModule (C:\nodescripts\node_modules\selenium-webdriver\lib\goog\base.js:1085:46)
at C:\nodescripts\node_modules\selenium-webdriver\lib\webdriver\promise.js:1:6
at Object.exports.runInContext (vm.js:64:17)
at Object.Context.closure.goog.retrieveAndExecModule_ (C:\nodescripts\node_modules\selenium-webdriver\_base.js:135:8)
at <anonymous>:1:6
at Object.exports.runInContext (vm.js:64:17)
at Context.closure.closure.vm.createContext.CLOSURE_IMPORT_SCRIPT (C:\nodescripts\node_modules\selenium-webdriver\_base.js:104:12)
at Object.goog.importScript_ (C:\nodescripts\node_modules\selenium-webdriver\lib\goog\base.js:879:9)
at Object.goog.importModule_ (C:\nodescripts\node_modules\selenium-webdriver\lib\goog\base.js:900:14)
我々はそれ以来(https://github.com/seleniumhq/selenium/wiki/WebDriverJs#getting-started)[GitHubのに]私たちのドキュメントを移行しました。更新されたドキュメントを使用して再度試してみてください。実際には、多くの違いがあるかどうかは分かりませんが、試してみる価値があります。 – sircapsalot
私は更新されたドキュメント作成のように試してみましたが、同じエラーがあります。私はエラーが発生したときに試してみました.WebDriverが必要なときに起こります。test = require( 'selenium-webdriver/testing')... –
申し訳ありません - 私はjsバインディングに慣れていません。 [問題を提起する](https://github.com/seleniumhq/selenium/issues/new)が必要かもしれませんが、[requirements](https://github.com/seleniumhq/selenium/tree)を読むことをお勧めします。 /master/CONTRIBUTING.md#bug-reports)。 – sircapsalot