Get the App
SLTechnology News&Howtos  ›  Development  › 

How python uses find_element_by_link_text ()

Shulou Source: shulou.com Published: 2022-06-01 02:13:53 09月21日 Update

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!

Tags: Elements articles links pages positioning done properties buttons methods more for knowledge industry information information channels channels analysis input Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia vpn Linux Apple