TestProject Forum

Compare css property value

Hi ,as part of regression testing on a UI, I am trying to compare css property values of an image banner line-height to determine whether there is any change in the banner position and then send a email notification or alert. I have tried to use Get CSS value but how do i move on from there? Any help will be much appreciated?

1 Like

Hi @seamug ,
First of all, welcome to our community :slight_smile: .

Please follow this example:

Let’s say the value of the CSS property (in this example, we are discussing line-height) was 13px before you did the regression testing on UI.

now please follow these steps:

  1. As you did, I will use the “get CSS value” addon to get the value of the property I want, I will put in the input: line-height, and I will store the output in a parameter.

  2. Add a new step with the “Send email” addon as an action, and fill in the required information, now we’ll put conditions to this step, for example, the value of the parameter=output(13px), equals 13px:

  3. In case any of the conditions is not met, the step will be skipped.
    and if the conditions do met you should get an email notification.

Let me know if you managed, and If you have any other questions feel free to ask :slight_smile:

Hi Alex

This is good. I have another question on css property parameters but will create a new topic. Thanks!

Hi @seamug ,
You are welcome, you can also write your question here if you want.
and I will be happy to help you with that :slight_smile: