Selenium+python positioning method

Today, I record an introduction to the positioning method of selenium+python. There are generally several types of positioning methods:
id
name
class
link text
xpath
tag
css
is enough for most of the commonly used ones, and there are several more if they are used.

Positioning element: The positioning method can be declared through by, and the corresponding positioning method is passed as a positioning parameter, for example:

find_element_by_id("kw")
other positioning methods are similar, just need to change the positioning method and parameters.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324893686&siteId=291194637