javaseleniumautotestsafaridriverfirefox-driver

Error when I run auto test with browser. How run it?


I need to run autotests. But both in Safari and in FireFox, such an error occurs. Safaridriver cannot be installed in Safari with version 10+. I tried to add drivers for these browsers to the project, I tried to write in the terminal:

safaridriver --enable
safaridriver --port 0

But it did not help.

Safari first opens this window (the name of the folder changes every time) enter image description here enter image description here

Firefox just freezes

    * пользователь переходит на страницу "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

Solution

  • It was about browser and driver versions. As a result, I used chrome / Setting for it took no more than 5 minutes