TestProject Forum
Powered by leading experts in the test automation community

How to use the input parameter amount with minus 1 in Get text from a given cell

Hi there, after using Count element found by locator with return amount of 3, and then I am going to use Get text from a given cell in Html table. I need to get a text from the last row, so I need to pass the value of 2 to Input parameter row, is that any workaround that I pass in the actual row value in below?

Hello Steve.
That should work, does it give you any error?

Yes, error with java.lang.NumberFormatException: For input string: “3 - 1”

I see, it considers the input as String.
you can do the following:
Use the evaluate mathematical expression action before ,save that as a result parameter and use the parameter in the table action.

Thank you for the quick solution, by the way is that possible that I can use back the same parameter, for example Input parameters Value - 1 and Output parameters Value. But It returns input as string error :slight_smile

If you mean by saving in the same parameter as you used, it should be possible but I recommend saving in a different one so you will not get confused by the two.

Thank you very much!