Verify an element's colour (Python)
QuizMediumPython onlyAsked in: Accenture, Infosys
A span is styled color: red. In Chrome, what does span.value_of_css_property("color") return, and how do you compare it with #ff0000?
rgba(255, 0, 0, 1); compareColor.from_string(value).hexwith#ff0000red, exactly as written#ff0000directly- It raises, because colours need JavaScript
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.