Highlighting failed field in selenium webdriver during runtime -
i want highlight failed field using selenium webdriver during run time. can tell me code that? in advance!!
you can update html elements css @ runtime using little javascript.
following method add red border element:
// method highlight element public static void highlightelement(webdriver webdriver, webelement element) throws interruptedexception { javascriptexecutor driver = (javascriptexecutor) webdriver; driver.executescript("arguments[0].setattribute('style',arguments[1]);", element, "border: 2px solid red;"); }
Comments
Post a Comment