Greg Patterson wrote:

I just started playing with Selenium, and was trying to test some pages on a remote server using the HTML examples(with modifications). When I try to click on a link, it doesn’t work. I looked at the code and there isn’t an “ID” specified in the HTML code for the href. Is this the only way to reference a link, or are there other ways for identifying the target?

Several. For example, if you know the link text, you could use

| clickAndWait | link=The Link Text | |

If it contains an image with an @alt attribute, you could

| clickAndWait | //[EMAIL PROTECTED]'theAltText'] | |

(This works because the click event will bubble up).

For more info, check out the "Element Locators" section of http://selenium.thoughtworks.com/seleniumReference.html

--
cheers, MikeW                            http://www.dogbiscuit.org/mdub/

_______________________________________________
Selenium-users mailing list
[email protected]
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to