Skip to content

Instantly share code, notes, and snippets.

@kypflug
Created November 4, 2019 00:55
Show Gist options
  • Save kypflug/4e8291e6ee65929944f8ba74b1575dd8 to your computer and use it in GitHub Desktop.
Save kypflug/4e8291e6ee65929944f8ba74b1575dd8 to your computer and use it in GitHub Desktop.
Running WebDriver against Internet Explorer mode
static void Main(string[] args)
{
var dir = "{FULL_PATH_TO_IEDRIVERSERVER}";
var driver = "IEDriverServer.exe";
if (!Directory.Exists(dir) || !File.Exists(Path.Combine(dir, driver)))
{
Console.WriteLine("Failed to find {0} in {1} folder.", dir, driver);
return;
}
var ieService = InternetExplorerDriverService.CreateDefaultService(dir, driver);
var ieOptions = new InternetExplorerOptions{};
ieOptions.AddAdditionalCapability("ie.edgechromium", true);
ieOptions.AddAdditionalCapability("ie.edgepath", @"\\msedge.exe");
var webdriver = new InternetExplorerDriver(ieService, ieOptions, TimeSpan.FromSeconds(30));
webdriver.Url = "http://www.example.com";
}
@NeelamChoudharyR
Copy link

Could share how to achieve same in VBA please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment