example: Can I just if a div tag has the css of
div{background-color: #444444}
and return true/false depending on the result?
I’m using watir webdriver to run testing scripts, I need to check values of css to and see if the changes have been applied etc.
Watir-webdriver has a built in
stylemethod for getting the computed styles.Get the style using:
This will return a string representing the computed style’s value. You can then compare that to your expected value.