Good day. There is a button that is disabled by default. When you enter numbers in the text field, the button becomes active. When deleting the entered numbers - the button is again disabled. With manual reproduction of steps, everything works as described. When you run AutoTest - when you clear the text field, the button does NOT become disabled, which is displayed in the browser.
[Category("ButtonDisabledWhenTextBoxCleared")] [TestCase()] public void TextButtonDisabledWhenTextBoxCleared() { IWebElement field = _driver.FindElement(By.Id("id")); field.SendKeys("12345"); Thread.Sleep(2000); field.Clear(); Thread.Sleep(2000); var act = =_driver.FindElement(By.Id("id")).GetAttribute("disabled"); Assert.AreEqual("true", act); } Tell me, please, what am I doing wrong? In autotesting the first steps, do not judge strictly.
thank