Issue with clicking button using playwright

I have a fairly good knowledge of xpath selectors from my short amount of time I did working with test automation but I’m struggling to get playwright to click on this button. I’ve spend a few hours trying almost every combination I can think of to no avail. When I run with browser visible I see the button turn a different color which makes me think it tried to click but it doesn’t actually register within the web app because the confirmation save dialogue text does not show as it usually does. To make it more interesting, this save button is very similar in three different parts on this “page”. Both in the simple schedule, advanced schedule and then on the distribution tab. I’m trying to click this one:

Again, it registers as a successful click within the robot but doesn’t actually perform the click. Any advice/guidance to get this to work would be great appreciated!

Hi, @bing098911!

Without access to that web app, these are all guesses of what might be the issue or how to reveal it:

  • What happens if one tries to (manually) save without entering all the required data? Maybe the bot misses filling some data, and thus the save will not go through?

  • Try adding a hard-coded Sleep before clicking the save button. It’s not best practice, but maybe something is happening right after filling in the form that needs to complete behind the scenes before one can save? The save button might become available, but maybe the app is still doing something.

  • Try enable_presenter_mode ( to make the bot go slow. Does it affect anything? This might help reveal issues such as slow async background operations.

  • Do you have the strict mode on ( That helps to identify cases where the bot finds multiple elements (and not the one you expect).

I feel extremely dumb right about now, but the issue was not the locator strategy at all, it was due to the fact that I was passing an old date into one of the fields. When clicking save, the application does not provide an error message on how to fix…I luckily happened to noticed the incorrect date!

Appreciate the quick response though and the presenter mode is an option I was not aware of!

1 Like