How to find the CSS attributes for website. For eg: I have a testcase where I need to test the styling and design of a Button for webpage. How can I retrieve the elements, if for example I need find out the Size, Opacity, Colour for an element using Inspect element or firebug ?
Cribbing from an answer from https://stackoverflow.com/questions/7754469/export-css-of-dom-elements:
Not a direct answer, but with Chrome Developer Tools, you can click inside Styles or Computed Styles, hit Ctrl+A and then Ctrl+C to copy all the styles in those given areas. It's not perfect in the Style tab because it picks up some extra stuff. Better than selecting them one by one I guess.
If you want to automate this, I'm aware of two possibilities:
There’s recheck-web (open source; disclaimer: I work for retest, the company behind the project). recheck replaces asserts and checks everything at once, including the CSS attributes of each element. Here, you also have a golden master to compare against.