From: Bob Hutchison Date: 2012-09-01T22:46:28+09:00 Subject: Re: [Ruby] Need help on passing spl characters (may be unicode characters) from keyword file On 2012-09-01, at 9:24 AM, Namit j. wrote: > Hi All, > > I need your help on the below scenario. Any help will be highly > appreciated. I am using cucumber with capybara and selenium. > > In my scenario I want to verify some text displayed in the application. > The text to be verified is "Passwords can contain only letters [a–z], > numbers [0–9], periods [.], underscores [_] or hyphens [-]." Please try > again. But when I ran the test it gave me an error. > I tried again by passing "Passwords can contain only letters [a" > In this scenario it ran successfully but after that when I append "-" to > it and passed "Passwords can contain only letters [a-" then it again > failed saying it cannot find the text specified. > When I saw the console window for the returned results it displayed the > text returned from the application as "Passwords can contain only > letters [a\u2013z], numbers [0\u20139], periods [.], underscores [_] or > hyphens [-]. Please try again." Well, I won't be a lot of help, but the \u2013 is i) unicode, ii) an 'en dash' rather than just a 'dash'. So you've got a Unicode file containing the messages. You also likely have an encoding problem somewhere. You could change the message file to contain a dash and maybe avoid fixing the encoding problem, or you could take a deep breath, and go after the encoding problem… Cheers, Bob > Please help me on how to pass this message from my keyword file. Please > let me know if some information is required from my side. > > Thanks in Advance, > Namit > > -- > Posted via http://www.ruby-forum.com/.