Im making automated browser scripts with javascript and I want to use the click() command on this website but the button on the website doesnt have an Id (which works fine). However it only has a class name. When I do document.getElementsByClassName(btn.btn-danger.btn-lg.btn-block.betButton).click()
it doesnt work.
Here is the inspect of the button I want to click:
<button class="btn btn-danger btn-lg btn-block betButton" data-color="r">1 to 7, Win x2</button>
Is it possible to use the click() function on the button? Is there someway to assign an Id myself? Thanks for any answers :)
I dont think that is a copy as I know what differences are. But the button doesnt have any Id only a class name. And as that doesnt work what else could I do to trigger a click() event?
Edit2 = There is 3 buttons with all the same class names the only difference is the text of the button and the data-color, is there any way to manipulate that?