Code Table HTML works only on a single line in the grid
Posted: Sun Aug 04, 2013 9:19 am
Hello,
Code Table HTML works only on a single line in the grid
how it does work on a all lines?
I prefer to work without Repository
kind regards,
Yoad
Code Table HTML works only on a single line in the grid
how it does work on a all lines?
I prefer to work without Repository
Code: Select all
dim repo As EasyadminRepository = EasyadminRepository.Instance
Dim someTableTag As TableTag
someTableTag = "/dom[@domain='localhost:7019']//div[@id~'gridview-\d\d\d\d']/table"
Dim webDocument As WebDocument ="/dom[@domain='localhost:7019']"
' Dim rows as Integer=repo.OpenLMEasyAdmin2.Table.Find(".//div[@id~'gridview-\d\d\d\d']/table/tbody/tr[2]").Count
' Dim rows As Integer = repo.HTMLTables.Table.TBody.Find("TR").Count - 1
Dim rows As Integer=someTableTag.Find(".//tbody/tr[2]").Count-1
' If(rows>1) Then
' List all elements of a table
For Each row As TrTag In someTableTag.Find("./tbody/tr[2]")
Dim rowInfo As String = ""
Dim rowNameCell As TdTag = row.FindSingle("./td[2]")
'Get all cells from the row
rowInfo += "All Cells: "
For Each cell As DivTag In row.Find("./td/div")
'
' if(cell.InnerText.Length>1) Then
' report.Info(cell.InnerText() )
' Else
' report.Warn(cell.InnerText())
' End If
' Move the mouse to each cell element
cell.MoveTo()
' Set css style
cell.SetStyle("background-color", "#33ff00")
Next
Next
End Sub
End Module
Yoad