TestProject Forum

IF Feature ON, then... IF Feature OFF, then

Hi all - hope everyone stays healthy these days :slight_smile:

Anyway.
I have a rather simple web recording issue: I need to perform a test step depending on if a feature option is switched OFF or if it is switched ON.

Example - Prints can be switched either OFF or ON:

image

An IF loop might be the right solution, however - to make it simple here - I just need to run the step if this step is switched OFF (Material design):

Can anyone please suggest a simple solution :slight_smile:

Next step, for me, is to define conditions where a combination af such “material switches” have been set ON or OFF. It is currently rather hard for me to tell from the DOM whether OFF or ON is on :frowning:

Any smart way of handling that, please - all suggestions are welcomed.

PS
There are (currently) around 10 such “parameters” that can be in an OFF or ON condition, and I need to cope for pretty much each combination (and the scope is likely to grow).

Thanks in advance,
Torben

Hi @tf1
You can use the get color action to validate if switch is on or off
First turn switch on and use the get color action to get value

Then save that value into a parameter as a checked state parameter

Then You can use the get color of all your toggle switch’s and validate that its equal to the parameter checked state

Please let me know if that solved your issue.

Great idea - thanks, Tal :slight_smile:

I shall definitely test your idea out :+1:

BR
Torben