Currently, I am exploring methods to automatically trigger a button click on a webpage with a specific tag and class. My approach involves using Tampermonkey (Javascript userscripts) to accomplish this task. Referencing the image of the CSS/HTML elements required for interaction:
https://i.sstatic.net/BBtKi.png
The highlighted element containing the button I aim to interact with is shown in the image above and has the following HTML structure:
<li data-v-29761082 class="list-item">
I have attempted to execute the button click command in the console with no success, using the code snippet below:
document.querySelector('li data-v-29761082.list-item')[0].click();
The presence of "data-v-29761082" in the naming convention poses a challenge, as I struggle to integrate these characters into the query selector. Although treating it as a single tag did not yield results, my objective remains to click the highlighted button visible in the screenshot.
In all likelihood, incorporating waitForkeyElements may be necessary to achieve automatic execution through Tampermonkey. For now, my focus is set on identifying a method to interact with the highlighted button using its specific tag and class attributes. Alternatively, any suggestions on different elements or approaches to resolve this issue would also be appreciated. Thank you in advance.