Hello RPA mates,
When I copy the following multi lines of numbers from notepad, and paste them to SAP GUI Multiple Selection, it works.
But in the following code, I tried to set the clipboard with defined text, then manually paste them to SAP GUI after each set method, SAP GUI always gave an error, complaining the content are not numbers.
After comparing the content, clipboard.set method changed \r\n line separator to \n automatically, anyone know how to prevent this or how to solve this?
var mytext = '1910\r\n2210'; var copied = ctx.clipboard.get(); //copy the above numbers first then get them var eq = copied === mytext; //true ctx.clipboard.set(mytext); ctx.clipboard.set(copied); var copied2 = ctx.clipboard.get(); var eq2 = copied2 === mytext; //false var mytext2 = '1910\n2210'; var eq3 = copied2 === mytext2; //true