[wtr-general] Re: include? text with special characters

2009-07-08 Thread Peace
Thank you all for your detailed responses. First of all, I don't get the Cp1252 error anymore. I could have gotten it before because I did some cut and paste. Thanks George for how to resolve the line breaks. All is working fine now. --~--~-~--~~~---~--~~ You

[wtr-general] Re: include? text with special characters

2009-07-07 Thread George
Hi Peace, I ran into the problem of including line breaks when checking text, and found that this worked for me: if ie.div(:id, Info).text.include? (First line.\r\nSecond line. etc) blah, blah blah end For the parens, you might want to try this: if ie.div(:id, Info).text.include? (First

[wtr-general] Re: include? text with special characters

2009-07-07 Thread takanobu watanabe
Did you try to mention WIN32OLE.codepage value ? tknv/ On Wed, Jul 8, 2009 at 1:06 AM, Georgegeorge.sand...@gmail.com wrote: Hi Peace, I ran into the problem of including line breaks when checking text, and found that this worked for me: if ie.div(:id, Info).text.include? (First

[wtr-general] Re: include? text with special characters

2009-07-05 Thread marekj
Is this issue happening only on this piece of text? I don't know the solution to this encoding problem with microsoft cp1252 but you can google it for some answers. As to the code let's break it down into 3 elements. 1. grab text from div with watir mytext = ie.div(:id, Info).text 2. use Ruby to