AttributeError: 'list' object has no attribute 'click' - Selenium Webdriver

后端 未结 8 676
暗喜
暗喜 2020-11-27 22:42

I am trying to use click command in Selenium webdriver using python. But I am getting the below error. Can some one help me?

Traceback (most recent call last         


        
8条回答
  •  遥遥无期
    2020-11-27 22:53

    if you want single element so u can use:

    driver.find_element_by_link_text("MISCQA Misc Tests")
    

    or if you want whole list, then:

    for x in self.driver.find_elements_by_link_text("MISCQA Misc Tests"):
        link = webdriver.ActionChains(self.driver).move_to_element(x).click(x).perform()
    

提交回复
热议问题