Desktop app keyword test, extract alphanum, edit and convert to number for later use?
I'm currently evaluating TestComplete and am trying to do a few relatively simple-seeming things, but I'm stuck on this one. I'm not a developer so coding this from scratch is a non-starter at this stage, I need to be able to use the GUI functionality of TestComplete to accomplish this task.
I'm going to need to extract a number from our Desktop app, to use in a later step of the app. However, the value I need is a monetary value and also contains a currency label (USD, in this case).
I can get the object in question, but have not been able to figure out how to trim off the currency label. The value is in the format "##,###.## USD" (no quotes, of course).
I can't find any string manipulation functions within the GUI of TestComplete. Is what I need to do even possible, or is there no option but to get a developer to do this? Part of the reason I'm looking at TestComplete in the first place, is because developer resources are limited and I was hoping that we in QA could create these tests on our own.
Again in case it's not already clear, here are the steps I need to accomplish:
- Identify object on screen
- Extract alphanumeric value
- Trim off the alpha portion
- Store this result as a number that I can use to perform simple math calculations on later
It is common for new user and advanced user to have severe miss understanding discussing technicalities. Does it mean your problem is solved and this can be marked as solution?
The following project includes a script with two samples for you to run and inspect the how to accomplish, expand the log to see the run details. It uses most of your provided details and catered to different variations and also the max currency length upper limits, extract and open the "ConvertStringToNumber.mds" file.