2

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?

2 Answers 2

5

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
Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.