How to find a silverlight elements (avoid usage of full paths to each element)
I’m trying to acquire basic knowledge of testcomplete testing of Silverlight apps and faced with a problem.
While my testing of .net web application i used page objects and operate with them via NativeWebObject, ecpecially NativeWebObject.Find().
Whether same "find" approach is acceptable for Silverlight applications?
For example i tried example code (on silverlight.net)
Sub Main
Dim p, page, app, menu, menu1, i
' Launch Internet Explorer and load Silverlight Toolkit Samples
Call Win32API.WinExec(BuiltIn.GetCOMServerPath("InternetExplorer.Application"), SW_NORMAL)
Set p = Sys.Process("IEXPLORE")
Set page = p.Page("*").ToUrl("http://silverlight.net/samples/sl2/toolkitcontrolsamples/run/default.html")
Set app = page.Panel("silverlightControlHost").Object(0)
Set menu = app.UIAObject("SampleSelection")
menu.UIAObject("TreeViewItem", 4).Click
Set menu1 = app.UIAObject("SamplesTab")
menu1.UIAObject("TabItem").UIAObject("VactionTreeView").UIAObject("UniqueId118_").UIAObject("UniqueId186_").UIAObject("Italy").UIAObject("Italy").Click
End Sub
and was succeeded to click "Italy" only via its full path.
Could you point me, is there any simple way of exploring Silverlight elements except using their full paths. Possibly i'm demanding too much?
Thank in advance!