java - Verify the change of background color of the Textfield -
how can verify if textfield changed background color after action commited or form submitted?
thank you!
i can't provide more if don't provide code. here's demo can have look. basically, can css values webelement.getcssvalue method.
<input id="txttest" /> <button id="submit" onclick="document.getelementbyid('txttest').style.background = 'orange';">submit</button>
webelement btnsubmit = drvier.findelement(by.id("submit")); btnsubmit.click(); webelement txttest = drvier.findelement(by.id("txttest")); string color = txttest.getcssvalue("background-color"); // color should "orange" in case
Comments
Post a Comment