I am writing integration tests in C #, and when I use the click () method for some elements inside the dialog box, nothing happens and I don't get errors. It will click some elements inside the dialog box, but not others. I thought that if he didnβt choose them correctly, he would throw and exclude, but he works smoothly and says that the test passed, even if he didnβt actually press a button. The dialog box is an iframe.
I thought that maybe he was trying to click a button that was not yet displayed or turned on, so I added it before calling click ():
_driver.SwitchTo().Frame(_frameElement); _wait.Until(d => { var shippingInfoButton = d.FindElement(By.CssSelector("input[title ='Info']")); return shippingInfoButton.Displayed && shippingInfoButton.Enabled; }); var infoButton = _driver.FindElement(By.CssSelector("input[title ='Info']")); ScrollToElement(infoButton); infoButton.Click();
again this runs without exception, so I assume that he found this element and it is displayed and activated.
Let me know if you need more information. Thanks
Mitch source share