lomer
lomer

Reputation: 51

Using Selenium IDE, how to test CSS style information

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

Answers (2)

Dvir
Dvir

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

AutomatedTester
AutomatedTester

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

Related Questions