FindSingle does not find element
Posted: Thu Mar 03, 2011 1:23 pm
Hiya
In Ranorex Spy I find the XPath to the element of interest
e.g.
/form[@title~'XtraGrid Features']/container[@controlname='panelControl1']/container[@controlname='gcContainer']/container[@controlname='Grid100000Records']/element[@controlname='gridControl1']
In my code if I do:
Dim myElement as Ranorex.Unknown = "... the string above ..."
Then the element is found instantly
However If i do:
Dim myForm as Ranorex.Form = "/form[@title~'XtraGrid Features']"
Dim myElement as Ranorex.Unknown = myForm.FindSingle(of ranorex.unknown)("container[@controlname='panelControl1']/container[@controlname='gcContainer']/container[@controlname='Grid100000Records']/element[@controlname='gridControl1']")
Then it does not find the element
Any clues why?
In Ranorex Spy I find the XPath to the element of interest
e.g.
/form[@title~'XtraGrid Features']/container[@controlname='panelControl1']/container[@controlname='gcContainer']/container[@controlname='Grid100000Records']/element[@controlname='gridControl1']
In my code if I do:
Dim myElement as Ranorex.Unknown = "... the string above ..."
Then the element is found instantly
However If i do:
Dim myForm as Ranorex.Form = "/form[@title~'XtraGrid Features']"
Dim myElement as Ranorex.Unknown = myForm.FindSingle(of ranorex.unknown)("container[@controlname='panelControl1']/container[@controlname='gcContainer']/container[@controlname='Grid100000Records']/element[@controlname='gridControl1']")
Then it does not find the element
Any clues why?