返回

Selenium Note

目录

Python

查询网络元素

1
2
3
4
5
6
vegetable = driver.find_element(By.CLASS_NAME, "tomatoes")

fruits = driver.find_element(By.ID, "fruits")
fruit = fruits.find_element(By.CLASS_NAME,"tomatoes")

plants = driver.find_elements(By.TAG_NAME, "li")
Licensed under CC BY-NC-SA 4.0