Skip to content

Instantly share code, notes, and snippets.

@henesgokdag
Created July 18, 2021 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henesgokdag/e6336892f20916e7214a2efad2b1452b to your computer and use it in GitHub Desktop.
Save henesgokdag/e6336892f20916e7214a2efad2b1452b to your computer and use it in GitHub Desktop.
public void Wait(int second)
{
Thread.Sleep(1000 * second);
}
public void ClickElement(IWebElement element)
{
webElement = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(element));
element.Click();
}
public void SetText(IWebElement element, string text)
{
webElement = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(element));
element.SendKeys(text);
element.SendKeys(Keys.Tab);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment