Reputation: 51
I am testing a plugin which makes changes to the CSS of HTML elements – how can I use Selenium commands to verify/test these CSS changes?
Upvotes: 2
Views: 2880
Reputation: 83
You can use CSS classes and then check if the element has a specific class. In Selenium IDE :
Command: assertAttribute
Target: document.getElementById('header')[0]@class
Value: myHeader
Upvotes: 5
Reputation: 22418
Unfortunately Selenium IDE is mis-sold as a Record and Replay tool. Selenium IDE is actually a record, tweak and replay tool.
The tweak part is because the IDE can't record everything that you want. I recommend that you create your test from scratch by hand to get it to check the elements CSS.
Upvotes: 0