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

后端 未结 8 672
暗喜
暗喜 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:59

    The statement driver.find_elements_by_link_text("MISCQA Misc Tests") returns a list of WebElement some of which might not be clickable.

    So you will have to loop through the list of WebElement's returned and then click on those elements which are clickable.

    You can check if a WebElement is clickable or not by using the isClickable() function.

    I have not posted the code because I do not know Python. Hope this helps you.

提交回复
热议问题