
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Determine Colors Using Selenium
Selenium has the color conversion support class. We have to add the statement from selenium.webdriver.support.color import Color to convert colors to rgba/hex format.
Example
from selenium import webdriver from selenium.webdriver.support.color import Color #color conversion to rgba format print(Color.from_string('#00fe37').rgba) #color conversion to hex format print(Color.from_string('rgb(1, 200, 5)').hex) #color conversion to rgba format print(Color.from_string('green').rgba)
Output
Advertisements