我在运行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
出现这个问题是因为我用“test_”前缀命名了脚本中的一些函数。只需从这些函数的名称中删除“test_”前缀,问题就得到了解决。
问题内容: 我试图找出用户何时离开指定页面。找出他何时使用页面内的链接进行导航是没有问题的,但是我有点需要标记一些东西,例如当他关闭窗口或键入另一个URL并按Enter时。第二个不是那么重要,但第一个是重要。所以这是一个问题: 我如何查看用户何时关闭我的页面(捕获window.close事件),然后……并没有什么关系(我需要发送AJAX请求,但是如果可以获取它以运行警报,我可以剩下的)。 问题答案
未创建会话:此版本的ChromeDriver仅支持Chrome版本83构建信息:版本:“3.141.59”,修订版:“E82BE7D358”,时间:“2018-11-14T08:17:03”系统信息:主机:“Laptop-GRB5533T”,IP:“192.168.43.182”,OS.Name:“Windows 10”,OS.arch:“AMD64”,OS.version:“10.0”,java
我做了一个jsf应用程序。这个应用程序有一个包含开始、停止按钮的菜单。当按下开始时,应用程序开始从网站获取数据,并更新其数据库。应用程序还有更新过程的进度条。但是,这个过程需要很长时间才能完成。我希望当我关闭浏览器时,它应该继续更新数据库。此外,当我再次打开它时,我应该得到以前的状态。然而,这并没有发生。当我关闭浏览器时,应用程序也关闭了。我该怎么办? 谢谢。
我的控制台: RG.OpenQA.Selenium.Remote.UnreachableBrowserException:无法启动新会话。可能的原因是远程服务器地址无效或浏览器启动失败。生成信息:版本:“3.4.0”,修订版:“Unknown”,时间:“Unknown”系统信息:主机:“WS00MU016”,IP:“”,OS.Name:“Windows 10”,OS.ARCH:“AMD64”,OS
我有带oauth2安全mySql数据库连接和一些控制器的Spring Boot应用程序。我已经在AWS服务器上部署了它,它工作得很好,但它在一段时间后关闭了,它没有得到很多API调用,所以没有理由DDOS失败或outOfMemmory错误,我可以在日志中看到以下消息 2018-10-28 10:58:55.979信息1253---[线程-3]ConfigServletWebServerApplic
我正在使用Selenium C# Webdriver进行一些自动化测试。完成测试后,我想关闭浏览器。 我使用以下方法初始化驱动程序: 然后在做完某事后,我正在关闭它 有没有办法关闭它?