Dropdown react fiber make it impossible to click on option tag from devtool console

17 Views Asked by At

I'am working on an automation project with chromedp, I'am having trouble with the automation of a dropdown button.

Im using the chrome devtool to test my selectors, and other JS that I evaluate then in my chromedp code. Here is the dropdown element I'm talking about.

dropdown with option childrens

First I notice that the click function on the select element is not working, after playing around a little I figure out that the "showPicker" function act as a click on this element so I crafted this instruction : var el = document.querySelector('[data-testid="datepicker-year"]'); el.showPicker(); var opt = el.querySelector('[value="1994"]'); opt.addEventListener("click", function () {console.log("clicked")}); opt.click()

Here is a gif of the execution : execution gif

If someone have some clue I could work with it would be much appreciated.

EDIT : To reply to @James no the element doesn't respond to a change trigger.It does not seem to have any change listener attached to it. So here is the monitored click event that occur when clicking a year from the datepicker select button.

[click event part 1] (https://i.stack.imgur.com/zze22.png)

[click event part 2] (https://i.stack.imgur.com/RZh2i.png)

[click event part 3] (https://i.stack.imgur.com/5v1jR.png)

[click event part 4] (https://i.stack.imgur.com/EhCfa.png)

[click event part 5] (https://i.stack.imgur.com/WSNB1.png)

Thank you !

0

There are 0 best solutions below