Safari (12.1) Webdriver abruptly crashes when using Selenium's click() function or actions.clickAndHold([specific web element]).perform()

While executing my selenium scripts, I encounter a severe crash specifically when running the Safari web browser and clicking certain links.

The majority of click actions work fine with the Safari Webdriver. However, performing either webElement.click() or

webElement.actions.clickAndHold([some web element]).perform()
will cause the driver to crash.

This issue only arises when clicking on footer jump links, which are links that scroll down to the footer of the page upon being clicked.

Interestingly, this problem is exclusive to Safari; Chrome, Firefox, and other browsers do not experience this crash.

Has anyone faced a similar situation? Are there any workarounds available, such as alternative methods for clicking on web elements?

This complication surfaced when Safari 12.1.1 was released; prior to that, everything was functioning properly.

I suspect the following section of JavaScript code on the webpage might be triggering the crash:

        $.each(t, function(n, t) {
            var i = $(t)
              , r = p(i);
            r && r.not("[tabindex],input,textarea").attr("tabindex", -1);
            r && (i.data("anchor") ? console.warn("%c attr [data-anchor] is deprecated; use [href] or [data-jump-target] instead", "background: #222; color: #7fda55; font-size: 14px; padding: 4px", i[0]) : i.is(".jumpLink, .anchor-link, .superscript-link") && console.warn('%c classes .jumpLink, .anchor-link, .superscript-link for anchors are deprecated; use <a href="#value"> or <div data-jump-target="value"> instead', "background: #222; color: #7fda55; font-size: 12px; padding: 2px", i[0]))
        });

Additionally, here is the error thrown by Safari:

Process:               Safari [24240]
Path:                  /Applications/Safari.app/Contents/MacOS/Safari
Identifier:            com.apple.Safari
Version:               12.1.1 (14607.2.6.1.1)
Build Info:            WebBrowser-7607002006001001~3
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Safari [24240]
User ID:               502

Date/Time:             2019-06-21 15:16:23.521 -0600
OS Version:            Mac OS X 10.14.5 (18F203)
Report Version:        12
Bridge OS Version:     3.5 (16P5200)
Anonymous UUID:        56C84AF4-983B-688C-12EB-52065287562D

Sleep/Wake UUID:       6B696843-31A9-4795-B29B-E3D128CE40A4

Time Awake Since Boot: 57000 seconds
Time Since Wake:       720 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [24240]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebKit                0x00007fff49065320 WTF::Function<void (WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>)>::CallableWrapper<WebKit::SimulatedInputDispatcher::resolveLocation(WebCore::IntPoint const&, WTF::Optional<WebCore::IntPoint>, Inspector::Protocol::Automation::MouseMoveOrigin, WTF::Optional<WTF::String>, WTF::Function<void (WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>)>&&)::$_2>::call(WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>) + 346
1   com.apple.WebKit                0x00007fff49053bd6 WTF::Function<void (WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>)>::operator()(WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>) const + 72
2   com.apple.WebKit                0x00007fff4905a707 WebKit::WebAutomationSession::didComputeElementLayout(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&) + 1283
3   com.apple.WebKit                0x00007fff49161b12 void IPC::callMemberFunctionImpl<WebKit::WebAutomationSession, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&), std::__1::tuple<unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String>, 0ul, 1ul, 2ul, 3ul, 4ul>(WebKit::WebAutomationSession*, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&), std::__1::tuple<unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>) + 91
4   com.apple.WebKit                0x00007fff491615f0 void IPC::handleMessage<Messages::WebAutomationSession::DidComputeElementLayout, WebKit::WebAutomationSession, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&)>(IPC::Decoder&, WebKit::WebAutomationSession*, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&)) + 99
5   com.apple.WebKit                0x00007fff48e0e9b6 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 64

(the complete error message continues beyond this point).

Answer №1

Encountering a similar issue while utilizing the Action class to execute a shift-click action. Upon breaking down the chained action into individual steps, I identified that the crash occurs specifically at Action.KeyDown(elem, Keys.Shift).Perform()

I have been troubleshooting this problem intermittently for the past couple of days without much headway.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is there a way for me to retrieve the element that is linked to the ng-disabled attribute?

Is there a way to access the element with the ng-disabled attribute inside the function without passing it as a parameter? Here is the HTML element: <input class="needsDisabling" ng-disabled="isFieldDisabled()" type="text"> The isFieldDisabled fu ...

What is the best way to include the file name and size as query parameters in Node.js?

To retrieve an image from the folder, a query needs to be passed containing the filename and dimensions like this: localhost:3000/images?filename=myImage&width=100&height=100 The initial objective is to fetch images from the designated folder, res ...

I am encountering difficulty in looping through the data I have received. I have attempted to use forEach, for...of, and map() but have been

Is there a way to log the data (an array of objects) to the console without iterating through it? I understand that the data fetched in a for loop may not have finished executing all the get requests by the time I am using allOrders later, but I am strug ...

Is Material-UI suitable for a large-scale enterprise application?

We are in the process of transforming a massive and outdated MVC Java EE application into React. This particular application consists of a browser-based user interface with an extensive range of views that include intricate forms, listings, and links. It i ...

Spring Boot and WebFlux: How running certain steps in parallel can cause context loss

Spring boot: 2.1.3.RELEASE Greetings, I am currently exploring the context feature of spring webflux to carry a simple variable. I have implemented a WebFilter to set a context with this variable and attempted to access it in my controller at various sta ...

Input the variant number TypeScript as the key value pair

I'm struggling to input an abi key "5777" in Typescript. When I receive a network ID and try to set it in the networks key, the linter displays an error. My issue is that I need to specify "networkId" and it's not always a fixed value like "5777 ...

Instructions for inserting an anchor tag into the middle of a <p> element utilizing document.createElement("p")

When generating elements dynamically with JavaScript using document.createElement("p"), I am looking to create a paragraph element <p></p> that includes an anchor tag in the middle, creating a clickable link within the text. I aim to use JavaS ...

I desire to perform a specific task when there is a modification in the path using react router framework

Though I am mindful of it. props.history.listen((location, action) => { console.log("when route changes",location); }) However, I need to implement it in a slightly different way. For instance, let's cons ...

Anchor element not displaying Bootstrap popover upon focus trigger

I'm exploring ways to implement bootstrap popovers that respond to both click and hover events without relying on jQuery. I have a variety of controls on my page and I want to bind popovers to them using JavaScript. While testing with buttons and anc ...

Adapting imports in Typescript for seamless npm distribution

Currently, I'm facing an issue with module resolution while compiling my NPM package written in Typescript for publishing. In my project, I've been using non-relative imports to avoid the hassle of excessive ../../../. However, according to TypeS ...

What is the best way to showcase all menu and submenu items in separate dropdown lists?

Having trouble with my code, it's not functioning properly. I can't pinpoint the error. The menu displays correctly but the submenu isn't showing up under specific menus. Here is the code snippet: ##Table: menus## id name ...

Incorporating the database ID of an element into HTML to facilitate Ajax requests

Consider the following code snippet: <div id="256"> <p>SOMELEMENT</p> <button class="edit">EDIT</button> <button class="delete">DELETE</button> </div> <div id="257"> <p>SOMELEMENT2< ...

Develop an interactive React sidebar with changing elements

I'm in the process of developing a sidebar for a project, with the goal of making it similar to tools like Confluence. This means that we need the ability to rearrange documents and create subdirectory structures by simply moving the documents, with ...

Is it possible to add animation to an SVG filter to create a captivating rotating planet with color effects?

I've added a filter to my self-created SVG and I'm interested in animating it so that the colors move diagonally, giving the appearance of a spinning planet. Below is the code featuring my SVG and how I'd like it to begin with the blue colo ...

The fancybox's excess content is concealed

I've recently integrated fancybox 2 into my project and have encountered an issue when appending HTML content to the modal. I disabled scrolling, but now any overflowing content is being hidden. Could this be related to the max-height of the modal? Ho ...

Ways to prevent scrolling in Angular 6 when no content is available

I am developing an angular 6 application where I have scrollable divs containing: HTML: <button class="lefty paddle" id="left-button"> PREVIOUS </button> <div class="container"> <div class="inner" style="background:red">< ...

Obtaining an array through an AJAX request in JavaScript

I'm struggling with my ajax call setup: request = new XMLHttpRequest(); request.open("GET","/showChamps?textInput=" + searchChamp.value,true); request.send(null); request.onreadystatechange = function () { if (request.status == 200 && reques ...

Upgrade the jQuery library to the latest version 3.7.1, an update from the previous version 3.5

Looking to upgrade the jQuery library on my site from version 3.5.1 to version 3.7.1. Need to make sure I address any removed functions to prevent issues. Can anyone provide insights on which functions were removed in these updates? Checked the release no ...

Sorting through an array of timestamps to specifically filter out entries from 'last week', 'last month', and 'last year'

Currently, I am working with an array of timestamps and respective values. For each timestamp, I am converting it into a date format. There is a function in place that displays the dates from oldest to newest. My goal is to calculate time frames such as la ...

Hide element with jQuery if either of the two divs are currently visible

Initially, I have 2 hidden div elements: <div id="hidden1" style="display:none;"> <div id="hidden2" style="display:none;"> In addition, there is a visible div: <div id="visible" style="display:block"> A jQuery script ensures that only ...