I am using Selenium for chrome browser automation. I want to open a webpage and fill a login form , submit etc. Below is a part of code
Dim chromeOptions As New OpenQA.Selenium.Chrome.ChromeOptions()
chromeOptions.AddExcludedArgument("ignore-certifcate-errors")
chromeOptions.AddArgument("test-type")
Dim driver As IWebDriver = New ChromeDriver(chromeOptions)
driver.Navigate().GoToUrl("https://example.com")
Dim myLink1 As IWebElement = driver.FindElement(By.Name("userName"))
myLink1.SendKeys("username")
Dim myLink2 As IWebElement = driver.FindElement(By.Name("password"))
myLink2.SendKeys("mypassword")It works properly. But when i run the application a console window appears when chrome gets open. It is due to chromedriver.exe And cond=sole windows shows "Starting ChromeDriver (v2.9.248315) on port 2078". But I don't want this console window to appear as user suing application will not require it and understand what it is.So is there any way to avoid this console window? Also how can I get page complete events once the page gets loaded completely?
// assumes your ChromeOptions variable is
// already created
ChromeDriverService service = ChromeDriverService.CreateDefaultService();
service.HideCommandPromptWindow = true;
IWebDriver driver = new ChromeDriver(service, options);
If you need to make sure an element is present on a page before you can interact with it, you can wait for that condition. The support library (in the WebDriver.Support.dll assembly in .NET) contains a WebDriverWait class designed to enable exactly that.
If you mean something else, you'll need to be more specific in what you're asking.