开发者

Check for opened Browser using WatiN

开发者 https://www.devze.com 2022-12-14 23:03 出处:网络
I want to check if an IE is already opened or not If IE is opened so i.e. Goto(\"WWW.GOOGLE.COM\"); else open new IE and goto Yahoo.com

I want to check if an IE is already opened or not

If IE is opened so i.e. Goto("WWW.GOOGLE.COM");
else open new IE and goto Yahoo.com

for example:

 br = new WatiN.Core.IE(@textBox1.Text);

then when I press a button I want to check if IE is opened or not and perform the previ开发者_运维问答ous scenario.


Use:

IE.Exists(Find.ByUrl("Yahoo.com"));

In WatiN 2.0 RC1 this will be:

Browser.Exists<IE>(Find.ByUrl("Yahoo.com"));
0

精彩评论

暂无评论...
验证码 换一张
取 消