using System;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium;
namespace CSharpAutomationFramework.Tests
{
public class BrowserSource
{
var options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
public bool IgnoreZoomLevel { get; set; }
public bool IntroduceInstabilityByIgnoringProtectedModeSettings { get; set; }
InternetExplorerDriver protectivemode = new InternetExplorerDriver(options);
InternetExplorerOptions options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
InternetExplorerDriver zoom = new InternetExplorerDriver(zoomoptions);
InternetExplorerOptions zoomoptions = new InternetExplorerOptions();
options.IgnoreZoomLevel = true;
static string[] Browsers = {
"ie"
};
}
}
我试图在运行我的 selenium 脚本时使用上面的代码忽略缩放级别和保护模式设置,但脚本在构建解决方案时显示错误。不知道我哪里出错了。