Error while String and List compare

Hi Team,
I am facing some issues with string and list compare
The list I am using :

['<enabled/disabled>   enable TLS session cachingDefault: disabled', ' Enter a value between 0 and 24 <0..24>   number of hours to cache TLS sessions for resumption(0 disables timeout sessions)Default: 12', '<enumeration>   size of the diffie-hellman key.Default: DH_KeySize_1024<DH_KeySize_1024, DH_KeySize_2048>']

There are three tooltip string in the list, I need to compare them one by one if all the present in the list

I have used the below keyword

 Should Contain Match	 ${tooltip_list}	<enabled/disabled>   enable TLS session cachingDefault: disabled

But it is giving an error saying the pattern does not match

Is there any other way to compare the string present in the list

Hi Madhurya,

The expected string:

 '<enabled/disabled> enable TLS session cachingDefault: disabled'

and the string in the list:

['<enabled/disabled>   enable TLS session cachingDefault: disabled', ...

are not the same.

The one in the list has more spaces between <enabled/disabled> and enable TLS, so naturally the one with less spaces is not found in the list.

It’s all in your first screen shot.


1 Like

Hi Dave,

Tried with proper space string, still had the same issue
Is it because of the special characters and extra space?

Hi Madhurya,

You might have to try something like this as, multiple spaces have a special meaning in RF, as you can see in your most recent screenshot the string with multiple spaces has been split into multiple items (the comma (,))

Should Contain Match    ${tooltip_list}    "<enabled/disabled>   enable TLS session cachingDefault: disabled"


Hi Dave,

I tried the below method

Replace String	 ${tooltip_value}	${SPACE}${SPACE}${SPACE}	${SPACE}

replacing multiple spaces with single, it worked.

1 Like