views:

38

answers:

1

I wrote selector like this

jQuery("td:contains('test')").parent("tr").find("a")

I want to click link in table. It works great, however Id like to use it as selenium selector.

Selenium supports jQuery selectors, but they have to be one liners, for example

selenium.click("jquery=a:contains('test')");

How to convert my selector into one liner selector? is it even possible?

+3  A: 

Try jQuery("tr:has(td:contains('test')) a")

mohang
it works, thanks.
01