0

Selenium Ruby Webdriverスクリプトを実行すると、次のような問題が発生しました。

Seleniumがスクリプトの実行を終了した後、ブラウザーは閉じられます(これは予想される動作です)。ただし、直後にブラウザが再度開かれ、何もせずに閉じられ、継続的にブラウザが再び開かれて閉じられます。このことは、ブラウザ(FF16、IE9、またはChrome)が完全に閉じられる前に約4回繰り返されます。

以下のログメッセージは、ブラウザを開いたり閉じたりするたびに表示されます。@driver.quitを使用してブラウザを閉じていることに注意してください。この不便な状況を克服するために私がしなければならないことを私に教えてください。本当にありがとう。

*** LOG addons.xpi: shutdown
E*** LOG addons.manager: Application has been upgraded
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi-utils: Opening database
*** LOG addons.xpi-utils: Creating database schema
*** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-prof
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
*** LOG addons.xpi: New add-on {82AF8DCA-6DE9-405D-BD5E-43525BDAD38A} instal
in app-global
*** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} instal
in app-global
*** LOG addons.xpi: Updating database with changes to installed add-ons
*** LOG addons.xpi-utils: Updating add-on states
*** LOG addons.xpi-utils: Writing add-ons list
*** LOG addons.xpi: shutdown
*** LOG addons.xpi-utils: shutdown
*** LOG addons.xpi-utils: Database closed
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: No changes found
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
!!! error running onStopped callback: TypeError: callback is not a function
*** LOG addons.xpi: shutdown
E*** LOG addons.manager: Application has been upgraded
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi-utils: Opening database
*** LOG addons.xpi-utils: Creating database schema
*** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-prof
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
*** LOG addons.xpi: New add-on {82AF8DCA-6DE9-405D-BD5E-43525BDAD38A} instal
in app-global
*** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} instal
in app-global
*** LOG addons.xpi: Updating database with changes to installed add-ons
*** LOG addons.xpi-utils: Updating add-on states
*** LOG addons.xpi-utils: Writing add-ons list
*** LOG addons.xpi: shutdown
*** LOG addons.xpi-utils: shutdown
*** LOG addons.xpi-utils: Database closed
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: No changes found
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
!!! error running onStopped callback: TypeError: callback is not a function
*** LOG addons.xpi: shutdown
E*** LOG addons.manager: Application has been upgraded
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi-utils: Opening database
*** LOG addons.xpi-utils: Creating database schema
*** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-prof
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
*** LOG addons.xpi: New add-on {82AF8DCA-6DE9-405D-BD5E-43525BDAD38A} instal
in app-global
*** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} instal
in app-global
*** LOG addons.xpi: Updating database with changes to installed add-ons
*** LOG addons.xpi-utils: Updating add-on states
*** LOG addons.xpi-utils: Writing add-ons list
*** LOG addons.xpi: shutdown
*** LOG addons.xpi-utils: shutdown
*** LOG addons.xpi-utils: Database closed
*** LOG addons.xpi: startup
*** LOG addons.xpi: Skipping unavailable install location app-system-local
*** LOG addons.xpi: Skipping unavailable install location app-system-share
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: No changes found
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
!!! error running onStopped callback: TypeError: callback is not a function
4

1 に答える 1

1

この問題は、スクリプト内の一部の関数に「test_」プレフィックスを付けて名前を付けたために発生しました。これらの関数の名前から「test_」プレフィックスを削除するだけで、問題は修正されました。

于 2012-12-03T13:51:47.163 に答える