Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to make WatiN click a link before the page finishes loading

We're using WatiN for testing our UI, but one page (which is unfortunately not under our teams control) takes forever to finish loading. Is there a way to get WatiN to click a link on the page before the page finishes rendering completely?

like image 421
Glenn Slaven Avatar asked Sep 08 '08 01:09

Glenn Slaven


1 Answers

Here's the code we found to work:

IE browser = new IE(....);
browser.Button("SlowPageLoadingButton").ClickNoWait();
Link continueLink = browser.Link(Find.ByText("linktext"));
continueLink.WaitUntilExists();
continueLink.Click();
like image 93
Glenn Slaven Avatar answered Nov 10 '22 06:11

Glenn Slaven