I'm trying to create an automated login system on Python using Selenium but I can't seem to be able to click on the "Login" button which uses a javascript code to send the login details.
Could someone let me know how I might be able to send the login details filled in by clicking on the "Login" button (more of a link it seems)?
The following is the div including the "Login" button.
<div class="btn-login">
<p>
<a href="javascript:cmdButton_push(document.MypageLoginActionForm);">Login</a>
</p>
</div>
XPATH:
//*[@id="login-form"]/div[1]/p/a
I've tried:
- click by finding the XPATH
- click by finding the text "Login" and neither have worked.
Please let me know should you have any questions. Thanks in advance!