FAQ
Hi

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):
File "C:\Users\vikram\workspace\LDC\test.py", line 13, in <module>
driver.find_elements_by_link_text("MISCQA Misc Tests").click()
AttributeError: 'list' object has no attribute 'click'

Here is my program

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

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

driver = webdriver.Ie()
driver.get(url)

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

driver.close()

I think I am missing some thing. Please suggest me

*Thanks*

*Vikram*

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mark Collin at Jun 27, 2012 at 9:28 am
    I don't recognise the language (so it's not one I use) but generally I would
    expect findElements to return a list, not an individual WebElement. I would
    expect you to not be able to perform a .click() on a list.



    From: selenium-users@googlegroups.com
    On Behalf Of Vikram Thaduri
    Sent: 27 June 2012 10:08
    To: selenium-users
    Subject: [selenium-users] AttributeError: 'list' object has no attribute
    'click' - Selenium Webdriver



    Hi



    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):

    File "C:\Users\vikram\workspace\LDC\test.py", line 13, in <module>

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

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



    Here is my program



    from selenium import webdriver

    from selenium.webdriver.common.keys import Keys

    from selenium.webdriver.common.by import By

    from selenium.common.exceptions import NoSuchElementException

    from selenium.webdriver.support.ui import WebDriverWait

    import config



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



    driver = webdriver.Ie()

    driver.get(url)



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



    driver.close()



    I think I am missing some thing. Please suggest me

    Thanks

    Vikram

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.



    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Vikram Thaduri at Jun 27, 2012 at 9:44 am
    Thanks for helping out. I found the answer for myself.

    The problem is, I am using driver.find_element[*s*] instead of
    driver.find_element. So one s makes difference. In fact I am following the
    eclipse :(. Obviously driver.find_elements_by_link_text returns list so If
    i send click event it wont understand.

    Thanks for helping and sorry for my bad question

    *-Vikram*





    On Wed, Jun 27, 2012 at 2:58 PM, Mark Collin
    wrote:
    I don’t recognise the language (so it’s not one I use) but generally I
    would expect findElements to return a list, not an individual WebElement.
    I would expect you to not be able to perform a .click() on a list.****

    ** **

    *From:* selenium-users@googlegroups.com [mailto:
    selenium-users@googlegroups.com] *On Behalf Of *Vikram Thaduri
    *Sent:* 27 June 2012 10:08
    *To:* selenium-users
    *Subject:* [selenium-users] AttributeError: 'list' object has no
    attribute 'click' - Selenium Webdriver****

    ** **

    Hi****

    ** **

    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):****

    File "C:\Users\vikram\workspace\LDC\test.py", line 13, in <module>****

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

    AttributeError: 'list' object has no attribute 'click'****

    ** **

    Here is my program****

    ** **

    from selenium import webdriver****

    from selenium.webdriver.common.keys import Keys****

    from selenium.webdriver.common.by import By ****

    from selenium.common.exceptions import NoSuchElementException ****

    from selenium.webdriver.support.ui import WebDriverWait****

    import config****

    ** **

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

    ** **

    driver = webdriver.Ie()****

    driver.get(url)****

    ** **

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

    ** **

    driver.close()****

    ** **

    I think I am missing some thing. Please suggest me****

    *Thanks*****

    *Vikram*****

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    ****

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedJun 27, '12 at 9:08a
activeJun 27, '12 at 9:44a
posts3
users2
websiteseleniumhq.org

2 users in discussion

Vikram Thaduri: 2 posts Mark Collin: 1 post

People

Translate

site design / logo © 2022 Grokbase