开发者

Click gmail signout link using Watin

开发者 https://www.devze.com 2023-02-24 04:53 出处:网络
I am using IE8 and IE9 on 2 different machines and I want to click the signout link of my gmail account.

I am using IE8 and IE9 on 2 different machines and I want to click the signout link of my gmail account.

Watin 开发者_StackOverflowis unable to find the signout link and gives me error.

Could anyone please help me and let me know how can I achieve this.

Thanks Yasir


expecting you have created a browser instance I think this will do the trick:

var signOutBtn = browser.Frame("canvas_frame").Link(Find.ByText("Sign out"));
signOutBtn.Click();

BTW be sure to update to WatiN 2.1 which supports frames in IE9 properly.

0

精彩评论

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