<Test()> _
Public Sub TableVisibility()
Dim table As HtmlTable = page.getByXPath("/html/body//table/")
Assert.AreEqual(1, table.getRowCount())
End Sub
The code above is a test using Html Unit integrated with Nunit used in VS 2003 for VB.Net. I get an invalid cast exception in the line where I am declaring an HtmlTable. I’m using XPath because the table has no id, I’ve no plans in placing id for the table in order for me to practice using XPath. Any thoughts running this without failure?
If unsure what type, do
Though the function GetType() does not show in the Intellisense, it does work.