-
-
Save kypflug/4e8291e6ee65929944f8ba74b1575dd8 to your computer and use it in GitHub Desktop.
Running WebDriver against Internet Explorer mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could share how to achieve same in VBA please?