String convert command | Code sample
You can use the String Convert command to convert timer results from a String to a Number. For example, in the script shown in the following image, we want to verify that the text 'Hello' appears on the screen in no more than 3.5 seconds.
We get the timer results (in milliseconds), assign the value to the timerStr
variable (String variable), and convert it to the timerNum
variable (Number variable). Now, we can verify that the result is less than or equal to 3500 ms.
Important: In versions 8.0 and earlier, the function name is 'Text Convert'. Starting in version 8.1, the function name is 'String Convert'.