Navigate() public method

Navigate to the specified form by performing a submit of that form.
public Navigate ( Form form ) : void
form Encog.Bot.Browse.Range.Form The form to be submitted.
return void
 public void TestFormGET()
 {
     var b = new Browser();
     b.Navigate(new Uri("http://www.httprecipes.com/1/7/get.php"));
     WebPage page = b.CurrentPage;
     Assert.IsTrue(page.Title.GetTextOnly().IndexOf("HTTP") != -1);
     var form = (Form) page.Find(typeof (Form), 0);
     Input input1 = form.FindType("text", 0);
     input1.Value = "New York";
     b.Navigate(form);
     page = b.CurrentPage;
     Assert.IsTrue(page.Title.GetTextOnly().IndexOf("HTTP") != -1);
 }
示例#2
0
 public void TestBrowser()
 {
     var b = new Browser();
     b.Navigate(new Uri("http://www.httprecipes.com"));
     WebPage page = b.CurrentPage;
     Assert.IsTrue(page.Title.GetTextOnly().IndexOf("HTTP") != -1);
 }