how to clone browser instance in watin
I need to clone the browser instance, In watin IE is shared resource which makes very difficult to store the previous browser instance
var browser = new IE(http://www.stackoverflow.com);
var copybrowser = browser;
browser.goto("http://www.superuser.com");
console.WriteLine(browser.Uri);
console.WriteLine(copybrowser.Uri);
output:
http://www.superuser.com
http://www.superuser.com
In this case i need to store the previous instance, i have seen clone method in watin, but i was unable to recall, does any one how to solve this problem, i ne开发者_StackOverflowed to get the previous instance of browser
Just create a class with browser property
public class Session
{
public Browser browser { get; set; }
...
...
}
In this case you can create multiple Session instances when each instance has his own browser instance.
精彩评论