Verifying two elements contain the same value parameter.

Ask general questions here.
Eamonn
Posts: 59
Joined: Wed Jul 16, 2014 9:30 am
Location: Dundalk, Ireland.

Verifying two elements contain the same value parameter.

Post by Eamonn » Thu Jun 18, 2015 11:56 am

I use the Get action to assign the innerTest of an element to a variable. I then validate that the variable value exists or compares to or with the innerTest of another element. I have done this successfully.
e.g. Get Value InnerText $varInnerText RepositoryItem1
Validate AttributeEquals $varInnerText RepositoryItem2

However, I have a case where the first element innerText is $113.00* and the 2nd element innertext is $113.00. The variable and the second element innertext are different and will not equal each other because of the * character on the end of the string varable. I was trying to use Regular Expression options to have the string variable not contain the * character. Is this possible? I am trying to avoid using a Code actio or converting the Recorded Module to a Code Module to ammend the string valiable. Can you suggest how I might do this, with or without use of RegExp?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Verifying two elements contain the same value parameter.

Post by Support Team » Fri Jun 19, 2015 8:41 am

Hello Eamonn,
I was trying to use Regular Expression options to have the string variable not contain the * character. Is this possible?
I guess the following RegEx should do the trick:

Code: Select all

.*[^*]
Please let me know if that helps.

Regards,
Robert
.
Image