Selenium Safari WebDriver crashes immediately - selenium

When trying to run .get(), the automated safari window opens and tries to load the given URL, but crashes immediately with "Safari has crashed unexpectedly" window.
The snippet just the beginning of a fully functional bot I made a few months ago. When coming back and trying to run it again, I have encountered this error.
My safari does have the "allow remote automation" option checked.
The WebDriver test code provided in the documentation causes the same issue, where the automation window opens then crashes safari immediately. I am on the latest versions of safari and MacOS.
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
class InstaBot:
def __init__(self, username, pw):
self.driver = webdriver.Safari()
self.username = username
self.driver.get("https://www.instagram.com")
Code opens automated safari window with instagram.com in the URL box, then crashes safari immediately.
Regarding browser/driver compatibility, latest versions installed, according to WebDriver Safari has native support, are there any recent compatibility issues? I have not found anything online.
Safari version 15.6, Selenium version 4.3.0, Python 3.10.5.

Related

Cypress - how to run cypress automation in safari browser?

When i have checked the cypress latest version of 12.5.1 it is suggested to use the playwright-webkit where the safari browser is using the webkit engine it seems. here I need to simulate real time safari browser execution. Is there any way to do this?
I have tried to execute the playwright-webkit but unluckily it is not even open the URL and webkit is not working properly and if we switch to chrome or another browser it is working fine. but my request is to execute in safari the most.

Safari on Browserstack now working correctly

I am automating a simple login script through Browserstack using Selenium.
The script I have written works on chrome windows, chrome mac os, and Android Samsung. However, when I run the script through apple iPhone 11 or mac os safari I get an error message saying can not locate
driver.findElement(By.xpath("//*[contains(text(),'Log in')]")).click();
Apart from the device, I am automating nothing else changes.
What is the fix for this?
If the test returned "cannot find element" on the device, I'll recommend changing the element locator strategy.
You could otherwise also try to inspect the app against the same browser manually via Live: https://live.browserstack.com/
This could help you narrow down if the element locator is correct.

Remote Safari driver for Safari 11 cannot click element

I am using Selenium grid jar on a mac machine.
When:
the test is started
Safari browser is opened
the target web page is navigated to
findElement() is completed successfully
but on attempted click or getting element displayed or visible state, there is
"An unknown server-side error occurred while processing the command.".
There was nothing in the node console log when the error occurred.
I am only using the "browserName", "safari" desired capability.
I have been searching for version dependencies or other capabilities needed, but I couldn't find anything. Any help would be appreciated.
Versions:
Safari 11.1.1,
Selenium-standalone 3.12.0,
Selenium.WebDriver 3.12.1

Firefox launches then closes with "Firefox has failed to launch (selenium 2.53.2)

I'm having a problem when launching Firefox from Selenium (using version 2.53.2).
When I launch it using:
from selenium import webdriver
driver=webdriver.Firefox()
it launches, then straight away tries to close with a "Firefox has stopped working" error.
This has been working previously, I tried to uninstall and reinstall Firefox, but I'm still getting the same problem every time.
I don't get the issue if I launch Firefox manually.
This is a know issue with Firefox 47:
https://bugzilla.mozilla.org/show_bug.cgi?id=1279127

Native events error for Selenium WebDriver 2.35.0 and Firefox 23.0.1

I tried to perform drag and drop operation by following on Firefox 23.0.1 browser with Selenium WebDriver 2.35.0:
driver.action.drag_and_drop(source, target).perform
but it results into:
Selenium::WebDriver::Error::InvalidElementStateError: Cannot perform native interaction: Could not load native events component.`
Even though change log says:
2.35.0 (2013-08-14)
===================
Firefox:
* Updated Firefox native event components to support Firefox 23.
why native events error is thrown with Selenium WebDriver 2.35.0 and Firefox 23.0.1 combination?
I asked same question twice on #selenium irc channel, but no one replied to it. Help me to understand if I'm doing something wrong.