Get the App
SLTechnology News&Howtos  ›  Development  › 

How python uses find_element_by_tag_name ()

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

This article will explain in detail how python uses find_element_by_tag_name (). The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Find_element_by_tag_name ()

Find_element_by_tag_name ()

1. From the element attributes located above, you can see that each element has a tag attribute, such as the tag attribute of the search box, which is the first input.

two。 Obviously, in a page, there are many same tags, so generally do not use tags to locate. The following example, for reference and understanding only, is sure to report an error.

From selenium import webdriverdriver = webdriver.Firefox () driver.get ('http://www.baidu.com')# locates the Baidu input box through tag (tag) and enters' python'ss = driver.find_element_by_tag_name ('input') ss.send_keys (' python'))

This is the end of the article on "how python uses find_element_by_tag_name ()". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Tags: Tags attributes articles positioning elements more input good practical obvious same for reference only no examples content that is articles knowledge pages references Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei vpn Linux Shulou Technology