How to find cell in webtable when I have identified a webelement in the cell
Here is my situation. I have a web table where the data is displayed irregularly (this means that a typical approach of searching by row and column will not work) -- so, I have to find a clever solution. While I cannot use typical approaches, I can identify particular web elements inside the table. The web elements have specific classes associated with them. The data that I am testing displays in the cells below the particular web elements with specific classes.
I would like to be able to reference the cell in which the web element exists so that I can get the test data by cell. This is my problem. I cannot find a way to get the cell row and column information from the web element living inside the cell.
Re: Finding a cell in webtable when I have webelem
Try this one out, even i had similar prob and i found this way to solve it.
Set Element = nothing
Set Element = Description.Create()
Element("micclass").value = "WebElement"
Element("outertext").value = "" ' Specify value of Web element
Element("outerhtml").value = "" ' Specify outerhtml of Webelemt
Set Obj = nothing
Set Obj = Browser("Status Pro Feed - Mapping").Page("Status Pro Feed - Mapping").WebTable("Order Record").ChildObjects(Element)
RowCount = Obj.count-1
For i=0 to Obj.count-1
RowsContainingyourvalue(i) = Rows(i) +1
Celldata(i) = Browser("Status Pro Feed - Mapping").Page("Status Pro Feed - Mapping").WebTable("Order Record").GetCellData(Rows(i)+1,2)