Sumit Bhatnagar
Sumit Bhatnagar

Reputation: 47

Click event not working in Safaridriver on Catalina OS where the same working on Firefox and chrome

Click action is not performed in the Safaridriver on OS Catalina Safari v13.02

Tried working with javascript which is working fine , but that's the work around and it doesn't go with my existing framework

Click is performed without any error and on UI nothing is clicked

Upvotes: 0

Views: 1540

Answers (4)

Sam Ginrich
Sam Ginrich

Reputation: 841

The problem is not really traceable without given HTML.

Observed similair behaviour and assumed in my case (amazon cookie acceptance popup) that the interaction protocol requires the mouse to be over the button to be clicked. The solution for this case is here.

WebDriver drv;
...

public boolean clickAndHold(WebElement we)
{
    try
    {
        new Actions(drv);
        .clickAndHold(we)
        .perform();
        we.click();
        return true;
    }
    catch (Exception x)
    {
        x.printStackTrace();
        return false;
    }
}

Upvotes: 0

Zheng Xiaodong
Zheng Xiaodong

Reputation: 153

there is the answer from

wd.execute_script("arguments[0].click();", elem)

I has been tested, It's working for me.

Upvotes: 0

Vikrant Kumar
Vikrant Kumar

Reputation: 93

JAVA

It is fixed as part of Selenium tests broken by recent update of safari to version 13?.

Check my response there or find working setup here:

  • MacOS: Catalina 10.15.4
  • Safari: 13.1 (15609.1.20.111.8)
  • Selenium: 3.141.59
  • Scripting Language: Java 1.8

Upvotes: 1

Juan Torres
Juan Torres

Reputation: 31

This is an existing issue for Safari v13, a lot of people are experiencing the same.

There is a similar question here .

Upvotes: 2

Related Questions