一段时间以来,我一直在使用 Selenium 和 InternetExplorerDriver 开发自动化。我想搬到 Coypu,我正在尝试转换我的代码。在 Selenium 中,我会指定:
InternetExplorerOptions customProfile = new InternetExplorerOptions()
{
EnsureCleanSession = true,
EnableNativeEvents = false,
IgnoreZoomLevel = true,
IntroduceInstabilityByIgnoringProtectedModeSettings = true,
RequireWindowFocus = false,
EnablePersistentHover = false,
AcceptInsecureCertificates = true,
};
InternetExplorerDriver customDriver = new InternetExplorerDriver(customProfile);
有没有办法在 Coypu 中使用这些设置?
当我尝试通过执行以下操作在上面的代码示例中传递 customDriver 时:
browserSession = new BrowserSession(session, customDriver);
它抱怨“无法从 'OpenQA.Selenium.IE.InternetExplorerDriver' 转换为 'Coypu.Driver'
有没有办法让 BrowserSession 将 InternetExplorerDriver 作为参数?或者有没有办法在 Coypu 版本的 SeleniumWebDriver 中指定 customProfile 中的设置?