Example-Code: | HtmlInputButton submit = new submit.SearchProperties[HtmlInputButton.PropertyNames.Class] = "SearchButton"; Mouse.Click(submit); | var hhName = ie.Div(Find.ByClass("HighlightedHeader")).Name;var linkUrl = ie.Link(Find.ById("testlinkid")).Url; var checkbox = ie.CheckBox(Find.ByLabelText("User Name:")); var checkbox = ie.CheckBox(Find.ByLabelText(new Regex("^User")));var linkUrl = ie.Link(Find.ByName("testlinkname")).Url; |
Example-Code: | Mouse.startDragging(submit); Mouse.stopDragging(0,40); | I don’t know how to realize it. |
Example-Code: | BrowserWindow bw = BrowserWindow.Launch("http://msdn.microsoft.com/en-us/library/system.xml(printer)"); WinWindow popupWindow = new popupWindow.SearchProperties[WinWindow.PropertyNames.Name] = "Print"; WinButton cancelButton = new cancelButton.SearchProperties[WinButton.PropertyNames.Name] = "Cancel"; Mouse.Click(cancelButton); bw.Close(); | using (var ie = new IE(new Uri("http://msdn.microsoft.com/en-us/library/system.xml(classic).aspx")))
|
Example-Code: (How to clear cookie/Cache) | BrowserWindow.ClearCache(); BrowserWindow.ClearCookies(); | // Clear the cache and cookies. IE ie = new IE(); ie.ClearCache(); ie.ClearCookies();
// Then go to the site and sign in. ie.GoTo("http://www.example.com/"); ie.Link(Find.ByText("Sign In")).Click();//***************************Other example********************************* // Clear cookies first.IE ie = new IE();ie.ClearCookies("http://www.example.com/"); // Then go to the site and sign in.ie.GoTo("http://www.example.com/");ie.Link(Find.ByText("Sign In")).Click();
|
Whether have much code examples: | No | Yes |
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |