Reputation: 1
How can I open a tab and go to "http://anotherwisite.com"? I tried this:
ie = new WatiN.Core.IE("https://somewebsite.com", true);
ie.TextField(WatiN.Core.Find.ByName("user")).TypeText(User.getName());
ie.TextField(WatiN.Core.Find.ByName("password")).TypeText(User.getPassword());
ie.Button(WatiN.Core.Find.Any).Click();
(the above code opens an IE and log the person in)
Upvotes: 0
Views: 2530
Reputation: 385
System.Windows.Forms.SendKeys.SendWait("^{t}");
Thread.Sleep(400);
//this is the new browser instance
var newTab = Browser.AttachTo<IE>(Find.ByTitle(string.Empty));
Upvotes: 0
Reputation: 31
I can open a new Tab and open new page with Watin
Code:
var browser1 = new FireFox("http://www.omda.com");
SendKeys.SendWait("^{t}");
browser1.GoTo("http://www.omda2.com");
I use the keyboard, CTRL+T in Firefox.
Upvotes: 3