Click on a webtable item, reference by row / col, in Selenium RC
Does anyone know how to click on a webtable item, referencing by row / col, in Selenium RC? I can retrieve the text from a specific item, e.g. row 1 / col 2, easily enough by:
String myString = selenium.getTable("id=myWebTable.1.2");
But I want to click on it, e.g. if it's a link, I'm unable to something like:
In QTP it can be done fairly straightforward by:
Set myObj = Webtable("myWebtTable").ChildItem(1,2,”Link”,0)
Any help greatly appreciated, thanks in advance.
I haven't used RC so not really sure but from the code above, it looks like you are trying to click on a String rather than an element. You should get the element & then click the element.
In webdriver, something like this: (c#)
IWebElement ele = driver.findElement(By.ID(<<row/column ID>>))
You could try like,
Thank/Like to help others if my input helped you !!!
I am speaking for myself, not for my employer nor any one.
Thanks, yeah it seems to be easy in WebDriver but I'm trying to run the equivalent code in Remote Control.
you are going in right direction , you can iterate a row column in the table compare your link and click on it then terminate the loop.
get the xpath of the webtable item or link and then try this
hopefully,it will work.