Reputation: 51
Hello i'm want to click to Login button under a href="javascript:void(0) as html code below Due to my knowledge about coding is not enough so some one could help me how to click to this link?
I'm using selenium with python 3.9 . Thank you guys so much
<div class="flex items-center space-x-4 transition duration-150 ease-in-out text-gray-700 hover:text-primary-500 dark:text-gray-300 dark:hover:text-blue-200" x-show="!user.loggedIn && !user.loading"><a href="javascript:void(0)" x-on:click="authorizeUser()">Register or Login</a></div>
<a href="javascript:void(0)" x-on:click="authorizeUser()">Register or Login</a>
Upvotes: 2
Views: 970
Reputation: 1957
you can get a
tag with driver.find_element
and then click It
driver.find_element_by_link_text("Register or Login").click()
Upvotes: 1