I trying to automate the Silverlight UI, It contains the tab structure the change tile textbox is in bydefault selected Tab , I am trying to access it (see the last line in test code which is Bold throws Exception.) but it throwing some exception the eeor messgae is as below
Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition.
Error: System.NullReferenceException: Object reference not set to an instance of an object.
at ArtOfTest.WebAii.Silverlight.VisualWait.WaitForExistsByFindInfo(VisualFindInfo findInfo)
at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)
My Xaml file code snippet is like below
<TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource TitleTextBlockStyle}"><Run Text="Change Title"/></TextBlock>
<TextBox x:Name="txt_Essentials_ChangeTitle" Grid.Row="0" Grid.Column="2" Margin="2">
</TextBox>
Below is my Test Code:
Settings mySettings = new Settings(BrowserType.InternetExplorer, @"D:\log\");
Manager myManager = new Manager(mySettings);
myManager.Start();
myManager.LaunchNewBrowser();
myManager.ActiveBrowser.NavigateTo("
http://ApplicationURL");
myManager.ActiveBrowser.WaitUntilReady();
SilverlightAppsList slvrApp = myManager.ActiveBrowser.SilverlightApps();
SilverlightApp app = slvrApp.GetApp(0);
app.FindName<
TextBox>("txt_Essentials_ChangeTitle").Text = "ArtOfTest did the trick";
Please Suggest me the solution I am stucked up here ...........!