While when element is designed to be displayed: none or visibility = hidden, we have to manually set element css style to be visible using Javascript for selenium to catch on.
Here is the code:
IWebElement checkbox = driver.FindElement(By.Id("identifierOrOther")); IJavaScriptExecutor executor = (IJavaScriptExecutor)driver; executor.ExecuteScript("arguments[0].style.display = 'block'", checkbox); checkbox.Click();
style.display = block can be replaced any other code, just inspect the hidden element and find out hidden css line.
No comments:
Post a Comment