1

I'm trying to click a checkbox using Karate UI, but that checkbox isn't rendered in the DOM until I hover over its parent element (which has a mouseenter event listener). I've tried a few methods to trigger the hover state, but nothing seems to work. These are what I've tried:

* mouse().move("element")
* waitFor("element").script("_.dispatchEvent(new Event('mouseenter'))")

1 Answers1

1

As far as I know what you tried are supposed to work.

Can you try adding a go() call like this, refer: https://stackoverflow.com/a/65216060/143475

* mouse().move("element").go()

You can try other JS options: https://stackoverflow.com/a/60800181/143475

UI automation is hard - especially when there can be JS in the page that gets in the way. I suggest you investigate more and ideally contribute code to Karate. At the very least please provide a way to replicate: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248