TestProject Forum
Powered by leading experts in the test automation community

Button won't click in safari but will work on other browsers

There is a button on a website that when I instruct to click it will work on Chrome and Firefox, but not in Safari. I have the correct xpath for the button. Below is what the id looks like when I press inspect element on safari:
<p id="check-email-button" onclick="checkMangoEmail(this)">NEXT</p>

Also I did notice it was in a

so I tried click paragraph and that also works on Chrome and Firefox, but not safari. Any ideas?

Hello @daniela.
Please try the click (Using Javascript) action instead of a normal click.
image

Let me know if that helped.
Best Regards, Ran.

Hi @ran.tzur,
Thank you so much that worked! I switched all my clicks to Click(using Javascript) and now they all work. One more question. My safari run is now failing on the “Clicks on the Nth item inside a web list element”. How can I fix that action so it works on Safari?

Hi @daniela, can you please click on the details of the step and take a screenshot of why the step fails on Safari?

Screen Shot 2020-05-27 at 12.58.26 PM

Here is the screenshot of the error on safari. I clicked expand on the message and here is what it contained:
java.lang.NullPointerException at Actions.ClickOnNthItem.execute(ClickOnNthItem.java:48)

Hi @daniela, can you please contact me on the Chat so I can assist you better with this.

Best Regards, Ran.