Contributions
Changing screen layout slightly changes coordinates, tests fail
Hi All I have a WPF application with a charting window in it, in this window are certain "Grips" which I can drag around the chart and it will draw best fitting lines etc. I recorded the test as a keyword and converted to script and got the follwoing function: function FreqResp_LPF_1000Hz() { //Clicks the 'ButtonDefault' button. //Drags from point (69, 250) of the 'Polygon' object to offset (-2, -164). //Drags from point (210, 246) of the 'EqPlot' object to offset (145, -160). //Drags from point (354, 248) of the 'Path' object to offset (147, -163). Aliases.VEParameterTool.HwndSource_LvTuningTool.LvTuningTool.ScrollViewer.DockPanel.DockPanel.tabControlMainTab.EQControl.EqTabs.DockPanel.DockPanel.Border.StackPanel.StackPanel.ButtonDefault.ClickButton(); Aliases.VEParameterTool.HwndSource_LvTuningTool.LvTuningTool.ScrollViewer.DockPanel.DockPanel.tabControlMainTab.EQControl.EqTabs.DockPanel.Grid.EqPlot.Canvas.Polygon.Drag(69, 250, -2, -164); Aliases.VEParameterTool.HwndSource_LvTuningTool.LvTuningTool.ScrollViewer.DockPanel.DockPanel.tabControlMainTab.EQControl.EqTabs.DockPanel.Grid.EqPlot.Drag(210, 246, 145, -160); Aliases.VEParameterTool.HwndSource_LvTuningTool.LvTuningTool.ScrollViewer.DockPanel.DockPanel.tabControlMainTab.EQControl.EqTabs.DockPanel.Grid.EqPlot.Canvas.Path.Drag(354, 248, 147, -163); } Now that works fine, but i found a small thing in my layout that wasnt right and had to change the size of another UI element, which slightly changed the position of the chart, and now this test fails because it cant find the object its looking for. The exact error is: There was an attempt to perform an action at point (354, 248) which is invisible or out of the window bounds. And the Additional Info is: Tested object: Aliases.VEParameterTool.HwndSource_LvTuningTool.LvTuningTool.ScrollViewer.DockPanel.DockPanel.tabControlMainTab.EQControl.EqTabs.DockPanel.Grid.EqPlot.Canvas.Path (Sys.Process("VEParameterTool").WPFObject("HwndSource: LvTuningTool").WPFObject("LvTuningTool").WPFObject("ScrollViewer", "", 1).WPFObject("DockPanel", "", 1).WPFObject("DockPanel", "", 1).WPFObject("tabControlMainTab").WPFObject("EQControl", "", 1).WPFObject("EqTabs").WPFObject("DockPanel", "", 1).WPFObject("Grid", "", 1).WPFObject("EqPlot").WPFObject("Canvas", "", 1).WPFObject("Path", "", 13)) Also, I have attached a picture top show you the "Grips" I can no longer access (I made the UC on the right huge to show the issue), therte are 4 "Grip Points" labeled in Black. Does anyone have any idea how i can fix my tests so that small UI changes dont break my tests? Many thanks in advace1.6KViews0likes1CommentChanging Window Title breaks test
Hi All, I am testing my WPF application, a click event opens a new window with the title "DebugWindow", i made a whole bunch of keyword tests on this window, then realised the window title was wrong, so i cnahed it to the correct name but now all my tets fail, TC cannot locate the window. I thought i would convert my keyword test to a script and from there change the name of the title, but this is what th script looks like: function ClickVolumeConfig() { Aliases.VEParameterTool.HwndSource_LvTuningTool.LvTuningTool.ScrollViewer.DockPanel.Menu.WPFMenu.Click("Config|Volumes"); Aliases.VEParameterTool.HwndSource_VolumeConfig object equals True. aqObject.CheckProperty(Aliases.VEParameterTool.HwndSource_VolumeConfig, "Enabled", 0, true); } This has no reference to the Window Title, and now I dont know how to fix my tests. Can anyone advise me please? AndySolved1.6KViews0likes1Comment