0

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

4 Answers4

2

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

There is a similar question here .

1

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
0

there is the answer from

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

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

Zheng Xiaodong
  • 143
  • 3
  • 9
0

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;
    }
}
Sam Ginrich
  • 661
  • 6
  • 7