我正在尝试使用ChromeDriver编写UNUIT测试。我的大多数测试执行正常,但是渲染时间超过5分钟的所有测试均失败,并显示一条消息:消息:OpenQA.Selenium.WebDriverTimeoutException:超时:超时从渲染器接收消息:300.000(会话信息:chrome = 81.0.4044.92 。我重新执行了很多次测试,并且错误总是在相同的测试用例上进行,我的最大等待时间是60分钟。我设置了此超时时间是因为很少有渲染需要30分钟的时间。驱动程序等待渲染,由于某种原因而崩溃。测试失败后,以下测试通过并且Chrome已启动并运行。我从未在IE中遇到过此问题。我到目前为止还尝试了版本81.0.4044.92的diff DLL chromedriver.exe文件,该文件也不起作用。 这是代码:
namespace Tests
{
[Author("Name", "r@a.com")]
public class ReportsTests
{
IWebDriver driver;
[OneTimeSetUp]
public void Initialize()
{
ChromeOptions options = new ChromeOptions();
options.AddArgument("no-sandbox");
driver = new ChromeDriver(ChromeDriverService.CreateDefaultService
("D:\\_TTS\\TBD\\NA\\S\DLLs\\"), options, TimeSpan.FromMinutes(60));
driver.Manage().Timeouts().PageLoad.Add(System.TimeSpan.FromSeconds(3600));
WebDriverWait waitWaivDriver = new WebDriverWait(driver, TimeSpan.FromSeconds(3600));
PageObjectActions.GO_To_Landing_Page_STG(driver);
PageObjectActions.ClickOnLink(driver);
}
}
}