I wanted to know how to write test scripts to test font style, color, size etc using python selenium if anyone of you knows can you please share me the appropriate links. ('i mean study material links')
1 Answer
element.value_of_css_property(property name (string))
will return value of the specified property, e.g. element.value_of_css_property("font-size")
returns the CSS "font-size" value.
Here are the docs: link
-
1OBS: Good to note this is just a functional test. It is not a certaity of visual rendering. To check if the browser is rendering the DOM correctly, you would need a Visual Testing Tool. Commented Oct 26, 2018 at 12:20
-