I want to write a python script that can check/test the css on a website. 1) selenium webdriver is equipped with value_of_css_property(property_name),which can be used to extract value of a css property for an element. This can be compared with an expected value. The selenium can then interact and if required record the changes in property and again compare with the expected value.
2) or capture screenshot of an element and then use PIL to compare the screenshot with the expected one(something what python [http://ift.tt/2lUDJEJ does),however since size and placement change according to resolution/device I don't know how feasible this approach is.
any thoughts as to what can be done from above or any other suggestions?
Aucun commentaire:
Enregistrer un commentaire