Contributions
Re: find a texblock object exist in the application
The error is in this line set mysegment = Sys.Process("NewsFlex").WinFormsObject("frmNewsPlexMDI").WinFormsObject("MdiClient", "").WinFormsObject("frmMocoContainer").WinFormsObject("splitContainer1").WinFormsObject("SplitterPanel", "", 2).WinFormsObject("mocoHost").WPFObject("HwndSource: AdornerDecorator", "elementHost1").WPFObject("AdornerDecorator", "", 1).WPFObject("AvalonAdapter", "", 1).WPFObject("main").WPFObject("dockMain").WPFObject("gridContent").WPFObject("gridMain").WPFObject("Viewbox", "", 1).WPFObject("Grid", "", 1).WPFObject("MocoPanel", "", 1).WPFObject("header").WPFObject("Border", "", 1).WPFObject("Grid", "", 1) The object not found is "WPFControlText","Segment A1 (12:28)",201.1KViews0likes0CommentsRe: find a texblock object exist in the application
I am doing the following way but I still get saying the object does not exist. can you tell what may be wrong. [FYI: the object I am trying find is something like this - WPFObject("TextBlock", "Segment A1 (12:28)", 2) ] step 1 set mysegment = Sys.Process("NewsFlex").WinFormsObject("frmNewsPlexMDI").WinFormsObject("MdiClient", "").WinFormsObject("frmMocoContainer").WinFormsObject("splitContainer1").WinFormsObject("SplitterPanel", "", 2).WinFormsObject("mocoHost").WPFObject("HwndSource: AdornerDecorator", "elementHost1").WPFObject("AdornerDecorator", "", 1).WPFObject("AvalonAdapter", "", 1).WPFObject("main").WPFObject("dockMain").WPFObject("gridContent").WPFObject("gridMain").WPFObject("Viewbox", "", 1).WPFObject("Grid", "", 1).WPFObject("MocoPanel", "", 1).WPFObject("header").WPFObject("Border", "", 1).WPFObject("Grid", "", 1) step2 set pobject = mysegment.Find("WPFControlText","Segment A1 (12:28)",20) step3 msgbox(pobject.Name)1.1KViews0likes0CommentsRe: find a texblock object exist in the application
I checked the object in the object browser: The following properties have Name = WPFObject("TextBlock", "Segment A1 (12:28)", 2) Text = Segment A1 (12:28) WPFControlText = Segment A1 (12:28) So I am doing the following way. 1. setting set mysegment = frmNewsPlexMDI.MdiClient.frmMocoContainer.splitContainer1.SplitterPanel.mocoHost.HwndSource_AdornerDecorator.AdornerDecorator.AvalonAdapter.main.dockMain.gridContent.gridMain.Viewbox.Grid.MocoPanel.header.Border.Grid 2. getting cordinates leftcordinate = mysegment.TextBlock(WPFcontroltext = "Segment A1 (12:28)").screenleft 3. MsgBox(leftcordinate) But I get the message saying non-existent object. please suggest the correct way to do.1.1KViews0likes0Commentsfind a texblock object exist in the application
We have a an object whose clrfullclassname is "System.Windows.Controls.TextBlock" Question: 1. to which object shall I map this,(I mapped it to WPFEdit) 2. How do I find whether an object with name " "Segment A1 (12:28)" exists, following is the way I am doing. plz suggest testobject.TextBlock( "Segment A1 (12:28)").exists15KViews0likes7Comments