How python uses find_element_by_link_text ()
The editor will share with you how python uses find_element_by_link_text (). I hope you will get something after reading this article. Let's discuss it together.
Find_element_by_link_text ()
1. Locate the button "hao123" on the Baidu page
View the page elements:
Hao123
two。 As you can tell from the element attributes, there is a href = "http://www.hao123.com."
Indicates that it is a hyperlink, and for this element, you can use the following methods:
From selenium import webdriverdriver = webdriver.Chrome () driver.get ('http://www.baidu.com')# locates the Baidu input box through tlink (hyperlink), and clicks driver.find_element_by_link_name (' hao123'). Click () to finish reading this article. I believe you have some understanding of "how python uses find_element_by_link_text ()". If you want to know more about it, please follow the industry information channel. Thank you for reading!