Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
You might not need to pass in and out the full alias name. As you noted, you can use "WaitAliasChild" to specify that you're waiting for a particular object. OR, for that matter, simply use the find so that
For that matter, it may be something that, instead of having to solve it within the automation code or the name mapping, it might need to be something that you map out in your data you're reading in.
Say, for example, you want to click the btnFinish object on the Foo form. You would document your data so that it would know the name of the parent object and the name of the button. That way, you can then use something like
That then makes your tests even more data driven in that the data itself determine what will be clicked on what form in the application. Your testing code then becomes less dependant upon contextual commands and more dependent upon the data. So long as everything is mapped out, you can call any combination of form and component and use a single bit of code to click on it. something like
This is rather rough and dirty but Boris Eligulashvili describes something similar in his article about improving GUI test automation
Aliases.Foo.FindChild("btnFinish")
For that matter, it may be something that, instead of having to solve it within the automation code or the name mapping, it might need to be something that you map out in your data you're reading in.
Say, for example, you want to click the btnFinish object on the Foo form. You would document your data so that it would know the name of the parent object and the name of the button. That way, you can then use something like
var MyObject = eval("Aliases." + FormName + "." + ObjectName)
That then makes your tests even more data driven in that the data itself determine what will be clicked on what form in the application. Your testing code then becomes less dependant upon contextual commands and more dependent upon the data. So long as everything is mapped out, you can call any combination of form and component and use a single bit of code to click on it. something like
function MyClickButton(FormName, ButtonName)
{
var MyButton = eval("Aliases." + FormName + "." + ButtonName)
MyButton.ClickButton()
}
This is rather rough and dirty but Boris Eligulashvili describes something similar in his article about improving GUI test automation