📜  如何在 selenium python 代码示例中选择 li 元素

📅  最后修改于: 2022-03-11 14:45:51.675000             🧑  作者: Mango

代码示例1
You need to use the .find_elements_by_ method.

For example,

html_list = self.driver.find_element_by_id("myId")
items = html_list.find_elements_by_tag_name("li")
for item in items:
    text = item.text
    print text