Hi,
I'm using the Telerik Testing Framework to create an automation framework to test our Silverlight application. There are a few instances where clicking a button requires a wait for another element on the screen to become usable. I wrap the button controls like so:
In some cases, however, clicking on a particular button requires a wait for some other control. The test script should have no idea that it needs to wait for another control after clicking a particular button. So, where I'm initialising the button instance itself, I am thinking to pass in a string of a method which contains the code in order to wait for another control on the screen to become usable (or whatever other code it needs) - and will need to overload Button.
But I'm not really sure what the best way is of doing this - I've had a look at InvokeMethod, maybe that will help?
Is someone able to point me in the right direction?
Thanks :)
I'm using the Telerik Testing Framework to create an automation framework to test our Silverlight application. There are a few instances where clicking a button requires a wait for another element on the screen to become usable. I wrap the button controls like so:
public
class
Button
{
public
RadButton Control;
public
Button() { }
public
Button(
string
automationId)
{
AutomationId = automationId;
Control = Manager.Current.ActiveBrowser.SilverlightApps()[0].Find.ByAutomationId<RadButton>(automationId);
}
public
string
AutomationId {
get
;
set
; }
public
void
Click()
{
this
.Control.User.Click();
}
....
}
In some cases, however, clicking on a particular button requires a wait for some other control. The test script should have no idea that it needs to wait for another control after clicking a particular button. So, where I'm initialising the button instance itself, I am thinking to pass in a string of a method which contains the code in order to wait for another control on the screen to become usable (or whatever other code it needs) - and will need to overload Button.
But I'm not really sure what the best way is of doing this - I've had a look at InvokeMethod, maybe that will help?
Is someone able to point me in the right direction?
Thanks :)