Selenium WebDriver Error AttributeError list object has no attribute click

0 votes

I want to use the click command on my test page. But I'm getting the below error. I've written it in python. 

Traceback (most recent call last):
File "C:\Users\admin\workspace\LDC\", line 13, in <module>
driver.find_elements_by_link_text("MISCQA Misc Tests").click()
AttributeError: 'list' object has no attribute 'click'

And below is my code. Please help.

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from import By 
from selenium.common.exceptions import NoSuchElementException 
from import WebDriverWait
import config

url = config.config.get('url')

driver = webdriver.Ie()

driver.find_elements_by_link_text("MISCQA Misc Tests").click()

Jun 8, 2018 in Selenium by eLiJha
• 770 points

2 answers to this question.

0 votes
The error is because your using driver.find_elements instead of driver.find_element. That's a syntactical mistake. Let me know if it solves it.
answered Jun 8, 2018 by king_kenny
• 3,710 points
Thank you so much )))
Hope you found it useful @Sergey_QA :)
Your example helped me a lot))
Glad that you got an answer.
brow vlw uma letra tava me atrapalhando tbm mas gracas a vc deu tudo certo aki, ate o proximo erro kkkkkkk
Feliz em ajudar
0 votes

If you are going to use a click() remove an S from elements to be element

driver.find_element_by_link_text("MISCQA Misc Tests").click()

For further understanding, you can refer to the Selenium Training.

answered Jan 17, 2020 by lwazi

even though it is getting 

AttributeError: 'list' object has no attribute 'Click'

This means that your code is returning back a list and not an object of the selenium web driver (what you want, object of the class having the function "click()" ).

Most likely, the elements of the list would be the objects.

Print the list after that part of the code and check if the elements of the list are the ones that you need.

Related Questions In Selenium

0 votes
1 answer

'The connection has timed out Error using Selenium Webdriver

Try to use implicit waits to ensure ...READ MORE

answered Apr 17, 2018 in Selenium by niki
+1 vote
1 answer
0 votes
1 answer

Double click a record in a grid using Selenium webdriver

Try Actions class to perform this Actions action ...READ MORE

answered Mar 30, 2018 in Selenium by Damon Salvatore
• 5,980 points
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
0 votes
1 answer

How do i click on <input type=file> on any browser if i'm testing with Selenium Webdriver?

Does not matter which OS or which ...READ MORE

answered Apr 29, 2018 in Selenium by king_kenny
• 3,710 points
0 votes
1 answer

Need some advise on the preferred element locators with Selenium WebDriver

Well let's not call it "Hierarchy". But, ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,710 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP