3

I am doing a ajax form where I change some CSS elements on the fly, and I was wondering is it posible to check these changes within selenium, an example would be checking the background-color:#ffffff , click button, background-color:#000000.

I have done a research on the net but can only find information on the 'css=' locator type which only give me locations of selector in the Dom model, not the css elements them selves.

is it possible to do what I have discribed?

1 Answer 1

6

The way that I would do something like this is to do an assert on an attribute

css = selenium.getAttribute("locator@attribute");

and then do your asserts on that item that is returned. So if its a style you would do

css = selenium.getAttribute("locator@style");

or if its a new class do

css = selenium.getAttribute("locator@class");
Sign up to request clarification or add additional context in comments.

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.