Skip to content

Instantly share code, notes, and snippets.

@muditlambda
Created April 3, 2020 14:02
IWebElement confirmButton = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementExists(By.CssSelector(button_css_selector)));
confirmButton.Click();
var confirm_win = driver.SwitchTo().Alert();
confirm_win.Accept();
IWebElement clickResult = driver.FindElement(By.Id("result"));
Console.WriteLine(clickResult.Text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment