Mehmet Fatih

Mehmet Fatih

  • 857
  • 939
  • 41k

Checkbox Click Event Error in selenium

Jan 16 2024 7:56 PM

Selenium CheckBox Click When working on the computer, the same codes error on the website. What is the solution of this error?

 private void checkBox2_CheckedChanged(object sender, EventArgs e)
 {
     WebDriverWait wait = new WebDriverWait(drv, TimeSpan.FromSeconds(100));
     IWebElement fileInput = wait.Until(drv =>
     {
         var element = drv.FindElement(By.Id("chkS2"));
         element.Click();
         return element.Displayed ? element : throw new NoSuchElementException();
     });
 }

 


Answers (3)