2

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 1

4

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

2
  • 1
    OBS: 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
  • ok and thank you for the info @JoãoFarias
    – manoj
    Commented Oct 29, 2018 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.