Here is a target for the test:
https://demo.wpjobboard.net/wp-login.php
I need to click on login button using javascript and I use this peice of code:
document.querySelectorAll('[id="wp-submit"]')[0].dispatchEvent(new Event('click'));
I need to use dispatchEvent
because the click
event here can be replaced with any event.
It will return true
but it won’t work. where is the problem?
query selector all will return a list of dom nodes, you should probably use just document.querySelector, but even better probably is document.getElementById since you are querying via ID.
Addtionally there is a simpler click event method available. What about something like this:
tadalafil prices – online tadalafil buy real tadalafil online