Manually able to click button, but Button "not intractable" in script

I’m using Katalon in Manual mode for doing my web testing (not great at coding).

I created a script but it won’t click 3 specific buttons stating:
“Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
(Session info: chrome=86.0.4240.75)”

I have even deleted the script and the items in the object repository. Then I re-added and the items in the object repository and wrote the script from scratch, and it still won’t click on three of the buttons

Ensure the elements are “ready” - this usually involved waiting until they are present, visible or clickable.

In essence, your test code runs like lightning. The browser… like a snail in comparison.

Start with this one - look to your left in the tree for others:

You should check, that you have captured the right element. Check locators of element in your repository.

Thanks for the advice,

I do however verify that the specific element is present before the Click step and that passes

Hi,

I took a week to build my repository to ensure that I have everything correctly saved as I wanted to avoid something like this.

Just a note, this program I’m automating has 4 screens that has Help Icons, the 1st Help Icon works as expected, it’s just the other 3 that keep saying “not interactable”

Hi @Kayleen you can try to click on them using js.
Thanks

1 Like

@Kayleen

Try to use Wait For Element Clickable, because being present doesn’t mean it’s clickable yet.

1 Like

@ThanhTo

Thank you, I tried this but it still marked the element as not interactable.

@Kayleen

That’s weird. Can you try EnhanceClick to see if it can click the thing.

1 Like

@ThanhTo

Just tried that and it passed (did get a JS error, but that won;t hinder testing.)

THANK YOU

1 Like

I predict the cause is “something” is in front of the target. enchancedClick has fallen back on using JavaScript which will allow a click to sneak underneath the obstruction.

1 Like

@Kayleen

Please be aware, you have not solved anything - yet. You merely found a way to move on with your test. Your code now does something no human user can do.

That’s fine if you control all conditions around that particular click. I test like that all the time. But if you are not sure, you should continue to find out what the true cause of the problem is.

If you want to push for a more robust solution, let me know.

@Kayleen

Let me clarify, Selenium click (what the Click Keyword in Katalon does) is designed to mimic a user click as closely as possible, which means that if an element is not interactable, an error will be thrown (and things like that).

On the other hand, Enhance Click falls back on Javascript click, which isn’t designed to mimic a user click, may successfully click on the object, but it doesn’t mean that a user can, which ruins the point of automation.

Was gonna come back to say you should investigate more, but @Russ_Thomas beat me to it.

1 Like

@Russ_Thomas and @ThanhTo

I would like to find out why these 3 are ‘not interactable’ within Katalon. I used to manually test this specific set and there is no issues when clicking on these 3 buttons.

I have informed my development team about this issue, I have not mentioned the work around as I want them to see what they can find on their side first :slight_smile:

Thank you both for all the help so far, it is greatly appreciated

1 Like

Ask them…

  1. Is there an element (perhaps invisible) that appears above the page while it is loading (or otherwise in a state of transition) that is eventually removed? A prime candidate here is a “spinner” - the image itself might be small, but the surrounding div (or whatever) likely fills the whole screen.

  2. Are they using CSS pointer-events or similar? If the page css is modified after a server call, that might explain why clicks aren’t getting through until that happens.

Morning @anuradha, I tried that as well, but it still gave the "not interactable’ error

Morning,

Just had a call with the Head Developer, He found that the clicks are “in-line”, he is changing this to be under Event Handler.

1 Like