| || |
try to find the xpath for the webtable
I am trying to write an xpath but always getting object not exists.
Note: I want to build an xpath to get this table from div id
then here the data
I tried like below
enrolleeID = "073006012101"
getDivTblid = "pt1:r1:3:r1:0fl1"
tablepath = "xpath:=//div[@id='" & getDivTblid & "']/table/tbody/tr/td/table"
If Browser("Browser").Page("Page").WebTable(tablepath ).Exist(01) then
print Browser("Browser").Page("Page").WebTable(tablepath ).getroproperty("innertext")
Please can anyone help to do this.
Escape all the regular expression characters
tablepath = "xpath:=//div\[@id='" & getDivTblid & "'\]/table\[1\]/tbody/tr/td/table\[1\]"
You could try a relative xPath:
sTableXPath = "//div[@Id='pt1:r1:3']/table"
As Venu suggests you may have to escape special chars.
Thanks for your help Venu and Mark
Finally I can able to find the problem and fixed it
now the xpath is looks like tablepath = "xpath:=//div[@id='" & getDivTblid & "']/table/tbody/tr/td/table"
Now it is working good