Hi ,
I am running few test scripts .Error i am getting is "element not found" for hyperlinkbutton,DataGrid,Listbox.I tried to find it by name as well as by type,but nothing works for me.I used silverlight spy to get the properties of the element.Attached is the details I got using silverlight spy.
Below is the details of error
<ErrorInfo>
<Message>Test method FF_TEST.FINDING threw exception:
ArtOfTest.Common.Exceptions.FindElementException: Element Not found!
FindExpression used:
[name 'Exact' dgProduct ]
</Message>
<StackTrace> at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
at ArtOfTest.WebAii.Silverlight.VisualWait.ForExistsInternal(Int32 timeout, Boolean invertCondition)
at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)
at ArtOfTest.WebAii.Silverlight.VisualFind.ReturnOrThrow(FrameworkElement e, String throwMessage)
at ArtOfTest.WebAii.Silverlight.VisualFind.ByName(String name)
at ArtOfTest.WebAii.Silverlight.VisualFind.ByName[T](String name)
</StackTrace>
</ErrorInfo>
my code is
var productGrid = app.Find.ByName<ArtOfTest.WebAii.Silverlight.UI.DataGrid>("dgProduct");
I tried below line as well
var productGrid = app.Find.ByName("dgProduct").As <DataGrid> () ;
it was noticed that productGrid variable is getting assigned with null value.
Similar issue is found with other controls like hyperlinkbutton ,listbox and label
Please guide me to solve this issue