public void Mouse_click_will_fail_because_recorded_map_based_on_tag_instance_should_be_based_on_VisibleOnly_for_real_use() { var example2Path = Path.Combine(TestContext.TestDeploymentDir, "example2.htm"); var window = BrowserWindow.Launch(example2Path); var map = new RecordedUIMap(); map.UIItem2ad6de5575f1403fWindow.CopyFrom(window); var visibleLink = map.UIItem2ad6de5575f1403fWindow.UIItem2ad6de5575f1403fDocument.UIHelloHyperlink; // remove tag instance filter because relative tag order of visible control will change dynamically in actual system under test visibleLink.FilterProperties.Remove(HtmlControl.PropertyNames.TagInstance); // add VisibleOnly search configuration to match visible item regardless of relative tag position visibleLink.SearchConfigurations.Add(SearchConfiguration.VisibleOnly); visibleLink.Find(); Mouse.Click(visibleLink); }
public void Mouse_click_will_succeed_because_recorded_filter_properties_includes_tag_instance_number() { var example2Path = Path.Combine(TestContext.TestDeploymentDir, "example2.htm"); var window = BrowserWindow.Launch(example2Path); var map = new RecordedUIMap(); map.UIItem2ad6de5575f1403fWindow.CopyFrom(window); var visibleLink = map.UIItem2ad6de5575f1403fWindow.UIItem2ad6de5575f1403fDocument.UIHelloHyperlink; visibleLink.Find(); visibleLink.DrawHighlight(); Mouse.Click(visibleLink); }