Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
You're stuck for two reasons.
First of all, you're using "Keys" which is going to send the literal string to the screen so there's not a way of telling the Keys method "replace period with comma".
Second stuck is that you're using hardcoded strings period. Even if you were using SetText('3.7') or simply Object.Text := '3.7' you'd still have a problem because, again, it's a literal string being sent.
Now, if you were doing a data driven test of sorts where you're reading values in from a file, you could simply have different files for different regional settings...
.. OR... go one step further and write custom code to read the values from the file, translate them into regionalized values, and then pass them in to Keys, SetText or whatever other function you need.
First of all, you're using "Keys" which is going to send the literal string to the screen so there's not a way of telling the Keys method "replace period with comma".
Second stuck is that you're using hardcoded strings period. Even if you were using SetText('3.7') or simply Object.Text := '3.7' you'd still have a problem because, again, it's a literal string being sent.
Now, if you were doing a data driven test of sorts where you're reading values in from a file, you could simply have different files for different regional settings...
.. OR... go one step further and write custom code to read the values from the file, translate them into regionalized values, and then pass them in to Keys, SetText or whatever other function you need.