如何在 watin 中克隆浏览器实例
我需要克隆浏览器实例,在 watin IE 中是共享资源,这使得存储以前的浏览器实例非常困难
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
在这种情况下我需要存储以前的实例,我在 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 need to get the previous instance of browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需创建一个具有 browser 属性的类
在这种情况下,当每个实例都有自己的浏览器实例时,您可以创建多个 Session 实例。
Just create a class with browser property
In this case you can create multiple Session instances when each instance has his own browser instance.