Save first few digits of a string as a variable
Good morning. I have a Keyword test, using VBScript. As part of this test, I have to have the script enter the base pay for a worker being hired. The UI actually lists a Pay Range in a field that is valid for the position. The Range displays as "12.00 - 15.00 /Hour" for example. I can use the string as my variable by pulling the contentText of the object and setting that to my variable to save for use later, but that pulls the whole string. What I really want is just the "12.00" portion of the string, and use that as my variable to be entered as the new hire's hourly wage in a step in my test. Ideally take the text that displays to the left of the "-" character.
My screenshot includes what I am currently using to get the whole string. I'm guessing I need to use the Code Expereeion mode of the Set Variable Value, but have no idea how to code this. Again, this is a VBScript Keyword Test.
Any help would be very much appreciated.