-
-
Save henesgokdag/4acb3b38ef4b59790f5932e9b48c5fcb to your computer and use it in GitHub Desktop.
BrowserUtility.cs
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
public class BrowserUtility | |
{ | |
IWebDriver webDriver; | |
public IWebDriver ChromeDriver(string url) | |
{ | |
ChromeOptions options = new ChromeOptions(); | |
options.AddArguments("start-maximized"); | |
options.AddArguments("disable-popup-blocking"); | |
options.AddArguments("disable-popup-blocking"); | |
webDriver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), options); | |
webDriver.Navigate().GoToUrl(url); | |
return webDriver; | |
} | |
public void GoToUrl(string url) | |
{ | |
webDriver.Navigate().GoToUrl(url); | |
} | |
public void DriverClose() | |
{ | |
webDriver.Quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment