Closed uzhas-sovka closed 6 years ago
Can you show me how to set the page timeout in C#?
browser
is the IWebDriver and will have all of the same methods, so you should be able to do the same thing.
Browser.Manage().Timeouts().PageLoad = new TimeSpan(0, 0, 0, 2);
try
{
Browser.Navigate().GoToUrl(WPDC.Url);
}
catch (Exception ex1)
{
something to check presence
}
browser.Manage().Timeouts().PageLoad <- System.TimeSpan(0,0,0,2)
try url "http://www.something.com"
with ex -> displayed "selector"
That would be the same thing in canopy
Thanks, it works. BTW Canopy is amazing.
Awesome!
How can I stop loading page after some element is present? In plain Selenium for c# it's possible to set page timeout to 1 sec, receive an error (page continues downloading) and then repeatedly check element presence in catch block.
It seems I can't do this in Canopy,
pageTimeout <- 1.0
doesn't give me error.I'd like something like
Thank you!