How do you wait for a page to load in TestLeft?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2016
01:57 AM
05-23-2016
01:57 AM
How do you wait for a page to load in TestLeft?
Hi,
I'm using TestLeft with visual studio C#. I need to get my code to wait for the web page to load. I don't want to use hard delays (e.g. Thread.Sleep(2000) ). Does anybody have any examples of how to do this?
Thanks,
Jamie.
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2016
07:59 AM
05-24-2016
07:59 AM
Hi Jamie,
You can use the IWebPage.Wait method. Here is a simple example:
IWebPage page = Driver.Find<IWebBrowser>(new WebBrowserPattern() { ObjectIdentifier = "chrome" }).Find<IWebPage>(new WebPagePattern() { URL = "https://community.smartbear.com/t5/TestLeft/How-do-you-wait-for-a-page-to-load-in" + "-TestLeft/m-p/119673", ObjectGroupIndex = 0 }); /*...*/ page.Wait(1000);
Julia Bernikova
SmartBear Customer Care Manager - TestComplete
SmartBear Customer Care Manager - TestComplete
