gpt4 book ai didi

java - 当我使用浏览器运行自动测试时出错。怎么运行呢?

转载 作者:行者123 更新时间:2023-12-01 23:51:41 24 4
gpt4 key购买 nike

我需要运行自动测试。但无论是在Safari还是FireFox中,都会出现这样的错误。 Safaridriver 无法安装在版本 10+ 的 Safari 中。我尝试将这些浏览器的驱动程序添加到项目中,我尝试在终端中编写:

safaridriver --enable
safaridriver --port 0

但这并没有帮助。

Safari 首先打开这个窗口(文件夹的名称每次都会改变) enter image description here enter image description here

Firefox 死机了

    * пользователь переходит на страницу "https://www.google.com/" # CommonStepDefinitions.goTopage(String)
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/Applications/Firefox.app/Contents/MacOS/firefox-bin) on port 7056; process output follows:
gb(249, 249, 250)","sidebar":"#38383D","sidebar_border":"rgba(255, 255, 255, 0.1)","sidebar_text":"rgb(249, 249, 250)","textcolor":"rgb(249, 249, 250)","tab_line":"#0a84ff","toolbarColor":"hsl(240, 1%, 20%)","toolbar_bottom_separator":"hsl(240, 5%, 5%)","toolbar_field":"rgb(71, 71, 73)","toolbar_field_border":"rgba(249, 249, 250, 0.2)","toolbar_field_separator":"#5F6670","toolbar_field_text":"rgb(249, 249, 250)","id":"default-theme@mozilla.org","version":"1.0"}}},"firefox-compact-light@mozilla.org":{"dependencies":[],"enabled":false,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource:///modules/themes/light/","runInSafeMode":true,"telemetryKey":"firefox-compact-light%40mozilla.org:1.0","version":"1.0","type":"theme"},"firefox-compact-dark@mozilla.org":{"dependencies":[],"enabled":false,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource:///modules/themes/dark/","runInSafeMode":true,"telemetryKey":"firefox-compact-dark%40mozilla.org:1.0","version":"1.0","type":"theme"},"yandex@search.mozilla.org":{"dependencies":[],"enabled":true,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource://search-extensions/yandex/","runInSafeMode":true,"telemetryKey":"yandex%40search.mozilla.org:1.0","version":"1.0"},"google@search.mozilla.org":{"dependencies":[],"enabled":true,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource://search-extensions/google/","runInSafeMode":true,"telemetryKey":"google%40search.mozilla.org:1.0","version":"1.0"},"ddg@search.mozilla.org":{"dependencies":[],"enabled":true,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource://search-extensions/ddg/","runInSafeMode":true,"telemetryKey":"ddg%40search.mozilla.org:1.0","version":"1.0"},"ozonru@search.mozilla.org":{"dependencies":[],"enabled":true,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource://search-extensions/ozonru/","runInSafeMode":true,"telemetryKey":"ozonru%40search.mozilla.org:1.2","version":"1.2"},"priceru@search.mozilla.org":{"dependencies":[],"enabled":true,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource://search-extensions/priceru/","runInSafeMode":true,"telemetryKey":"priceru%40search.mozilla.org:1.0","version":"1.0"},"wikipedia@search.mozilla.org":{"dependencies":[],"enabled":true,"lastModifiedTime":1568741645000,"loader":null,"path":null,"rootURI":"resource://search-extensions/wikipedia/","runInSafeMode":true,"telemetryKey":"wikipedia%40search.mozilla.org:1.0","version":"1.0"}},"staged":{}}: null
1570099148372 addons.xpi DEBUG Updating XPIState for {"id":"mailru@search.mozilla.org","syncGUID":"{e537eca7-821c-9442-8882-50fe71c7ab0e}","version":"1.0","type":"extension","loader":null,"updateURL":null,"optionsURL":null,"optionsType":null,"optionsBrowserStyle":true,"aboutURL":null,"defaultLocale":{"name":"Поиск Mail.Ru","description":"Search with Поиск Mail.Ru","creator":null,"developers":null,"translators":null,"contributors":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"installDate":1570099148372,"applyBackgroundUpdates":1,"path":null,"skinnable":false,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"toolkit@mozilla.org","minVersion":null,"maxVersion":null}],"targetPlatforms":[],"seen":true,"dependencies":[],"incognito":"spanning","userPermissions":{"permissions":[],"origins":[]},"icons":{"16":"favicon.ico"},"iconURL":null,"blocklistState":0,"blocklistURL":null,"startupData":null,"hidden":true,"installTelemetryInfo":null,"recommendationState":null,"rootURI":"resource://search-extensions/mailru/","location":"app-builtin"}
1570099148373 addons.xpi DEBUG Loading bootstrap scope from resource://search-extensions/mailru/
1570099148373 addons.xpi DEBUG Calling bootstrap method install on mailru@search.mozilla.org version 1.0
1570099148373 addons.xpi DEBUG Calling bootstrap method startup on mailru@search.mozilla.org version 1.0

最佳答案

这是关于浏览器和驱动程序版本的。结果我用了chrome/Setting才用了不超过5分钟

关于java - 当我使用浏览器运行自动测试时出错。怎么运行呢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58217430/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com