Hello,
I have a Keyboard.Press(parserParams[X]); command that generates an error when trying to type out the text:
${OutputFile}
The error returned is:
Unexpected exception occured: System.ArgumentException: 'outputfile' is not a valid member of the System.Windows.Forms.Keys enumeration.
at Ranorex.Keyboard.HandleEscapeGroup(String characters, Int32& index)
at Ranorex.Keyboard.Parse(String sequence)
at Ranorex.Keyboard.Press(String sequence)
...
I'm guessing this has something to do with the way csharp variables are handled. I tried using the escape sequence in the text but that failed. How do I get Ranorex to type out this text?
Thanks,
Jason
Unable to type out text "${OutputFile}"
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Unable to type out text "${OutputFile}"
The "{" is considered a special character by the Keyboard.Press(string) method (see the API documentation of that method). You need to escape that character by doubling it, i.e. write "{{" to get a "{" being typed. You can also use the Keyboard.EscapeSequence method to escape your string parameters, that method will double all the braces in the string.
Regards,
Alex
Ranorex Support Team
Regards,
Alex
Ranorex Support Team
Re: Unable to type out text "${OutputFile}"
Thank you, that did it.
Jason
Jason