I'm trying to simulate a click using the developer console for a react element. For making it easy for you guys to test instead of using my code, use the following react website https://www.tradingview.com/chart/?symbol=COINBASE%3ABTCUSD
This occurs on other websites like Facebook as well on some items. This is just an easy no login site to test.
The section I'm trying to click is an item in the watchlist. In the picture below I put an arrow pointing to it. The particular menu appears when you click the button above the alarm clock icon in the far upper right of the screen under the 'Start free trial' blue buton.
To understand what I expect to happen, try clicking on any of the columns in the row, like SPX, NDQ, DJI, etc... (you should see the page and stock graph change)
I can 'sort' of simulate a click currently, but all it does is highlight the row but not actually change the page like when you perform an actual click.
To see what I mean, press F12 to open the developer console and type a command like below.
document.getElementsByClassName("wrap-XdW9S1Ib")[2].dispatchEvent(new Event('click',{bubbles:true}));
The class name might be different for you, so you might have to hunt around in the element menu of the developer console to find out what it is for you. Do a search for the word wrap- and you should eventually find the right set of classes.
In the picture I uploaded you will notice that the click event triggers a blue background around the NDQ (since that is the '3rd' element of the wrap class). Note that it DID NOT change the actual page and stock graph however.
I have tried sending other events like 'input', 'select', 'submit', 'dblclick' to no avail. I have tried clicking sub elements of that wrapper as well, every single one with no luck.
My goal is to get it to simulate the click and actually get it to change the page as a result of that click.
What am I doing wrong with my current approach?


'hover'?