Unable to locate using find element by link

Posted by First Rock on Stack Overflow See other posts from Stack Overflow or by First Rock
Published on 2012-05-31T09:49:36Z Indexed on 2012/06/08 4:40 UTC
Read the original article Hit count: 159

Newbie in testing. I generated a test case using Selenium, and then exported it as a Python script. Now, when I try to run that in terminal, I get following error:

raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: u'Unable to locate element: {"method":"link                                                                                               
text","selector":"delete"}' 

I am using the command generated by Selenium i.e

driver.find_element_by_link_text("delete").click()

The reason for the error I believe is that the link "delete" in my web page is seen only when I click on a particular line to be deleted. So I guess it is being unable to locate the link. Please suggest what alternative measure could I use to locate and click on the "delete" link. Thanks in Advance:)

© Stack Overflow or respective owner

Related posts about python

Related posts about unit-testing