kusterg
14 years agoOccasional Contributor
Dynamic Properties
I am working with a .Net application and the widows are supposed to be ordinary windows objects.
In my application I register a new User and I get a confirmation window with the name of the user and its User ID.
For the displayed window itself it is mapped as
Aliases.Appl.dlg.
And no problem to access.
But the text on it seems to be a child and maps as:
Aliases.Appl.dlg.Static1
where the number changes each time I run the procedure.
TC refuses to compare the text.(The object does not exist).
My code is:
Call aqObject.CompareProperty(Aliases.Appl.dlg.WndCaption, cmpEqual, "New User Created", True)
Call aqObject.CompareProperty(Aliases.Appl.dlg.Static1.WndCaption, cmpEqual, "A new user has been created."&Chr(10)&"The user name is: xx", True)
Aliases.HSE.dlg.btnOK.ClickButton
First and last line work fine, middle one does not: The object does not exist.
How can I make the code independent of the dynamic part?
In my application I register a new User and I get a confirmation window with the name of the user and its User ID.
For the displayed window itself it is mapped as
Aliases.Appl.dlg.
And no problem to access.
But the text on it seems to be a child and maps as:
Aliases.Appl.dlg.Static1
where the number changes each time I run the procedure.
TC refuses to compare the text.(The object does not exist).
My code is:
Call aqObject.CompareProperty(Aliases.Appl.dlg.WndCaption, cmpEqual, "New User Created", True)
Call aqObject.CompareProperty(Aliases.Appl.dlg.Static1.WndCaption, cmpEqual, "A new user has been created."&Chr(10)&"The user name is: xx", True)
Aliases.HSE.dlg.btnOK.ClickButton
First and last line work fine, middle one does not: The object does not exist.
How can I make the code independent of the dynamic part?