Hi I am automating a webpage which contains multiple checkbox.
It clicks on a some checkbox and misses some checkbox.
This is my code.
Should I put a wait statement before the click to avoid this problem.
IWebElement ClickElement = Wait.Until((d) => webDriver.FindElement(By.Id(parameter1)));
ClickElement.Click();
Can you try making this change in your code –
In wait until function you are checking if the element exists by using
findElement(By.Id(parameter1))After finding the WebElement check if this is displayed by using
isDisplayed()method with in the waitUntil function.You can also check if it has already checked or not by using
isSelected()method.