I am doing POC on web responsive application using Katalon and the test i created works well with all browsers (chrome, firefox, edge) except for safari browser on mac. Test also work on mobile ios simulator using safari web browser
Issue on Safari: When i try to click on sign in button another button gets clicked
Any help is really appreciated
Mac OS - Catalina
Safari Version - 13.05
Katalon Version - 7.2.1
Locator I am using to identify and which is working on chrome, firefox and edge:
//button[@type=‘submit’]
Button which is getting clicked on safari:
<"“a _ngcontent-c5=”" class=“create-account button expand-for-small” routerlink="/registration" tabindex=“5” href="/registration">Create an Account</a"">
I tried using CSS and looks like its able to identify the element but not able to perform click operation. I dont see any failures in log. Element present and click works fine without any errors but nothing happens on the browser
As i said same code works fine on other browsers and mobile browsers
I have tried css and it doesn’t work only on safari browser.
Any configuration required for Katalon Safari browser which i am missing?
This is the harsh reality of test automation. There’s really no way around this, aside from multiple solutions to the same problem, or trying to implement a universal approach, which isn’t always possible.
There isn’t any configurable setting that would help you with this problem. There’s definitely a lot of other useful settings you could add though.
This usually indicates that you are clicking on an element other than the one you are expecting (css found a different element). Your original xpath looks fine to me, but if you can do the following it might give us a hint:
1.) Share your test script at the point where you are locating and clicking the button.
2.) Share a screenshot of the HTML in question, instead of typing it out (much easier for you to share and for us to read it this way).
I had a similar issue on Safari… Buttons worked in all browsers, but was very inconsistent or didn’t work at all in safari.
Few things I did to solve this was adding multiple attributes that I can have the automation identify the button with, then instead of using the standard WebUI.click command I created a custom keyword that I can recycle/reuse for all button across the site.
Here is an example of how I changed the Locator from xpath to attribute and added multiple qualifiers.
That’s like saying JavaScript is not working in the more popular browsers. You have something wrong somewhere. Using a CSS selector and issuing a JavaScript click is almost trivial. Take a huge step back, cut out all the unnecessary code and get that single click working. Then rebuild your test.