TestProject Forum

Text Comparison fails when using parameter, passes when using equivalent text

Hello - I am having an issue with a test. Here is the flow:

  1. Test is extracting integer from string in one step and saving to parameter.
  2. In subsequent step, I am using containsText and using the parameter from previous step to A) find the element (parameter is used in xpath successfully), and B) validate that the text value of the element = parameter value

What I am finding is that if I use the parameter as the ‘text input’ value, step fails. However, if I use the actual text string instead of the parameter, step passes. See screenshots below:

Have additional screenshots but system will not allow me to post unfortunately

Figured out my issue. When I was extracting only the numeric values to create the parameter, I used the ‘Get Substring in Range’ function, and I had my start index 1 number off, and so was collecting the space prior to the numeric values. All good now :).