- Code: Select all
/form[@processname='EXCEL' and @class='XLMAIN' and @instance='0']/element[@class='EXCEL2' and @instance='0']/container/element/element/container/button[@accessiblename='Maximize']
/form[@processname='EXCEL' and @class='XLMAIN' and @instance='1']/element[@class='EXCEL2' and @instance='0']/container/element/element/container/button[@accessiblename='Maximize']
Is there a way to dynamically determine the path of the UI control from either one of these workbooks? So if the paths change, or I'm not sure which instance to get during programming, is there a way to get the path on the fly, as the test case is executing?
For example if I hard code instance 0, the test case will crash if I try to click the button in instance 1.
I'm thinking, is there any code such as Ranorex.Button = GetPath("excel").ToString()
or
Ranorex.Button = "/form[@processname='EXCEL' and @class='XLMAIN' and @instance='*']/ .... button"
??
