I have a multiline text and when I am simply putting the whole text into a form using sendKeys, the form gets submitted on each line break.
I tried replacing the newline with carriage return this way:
String myText="Some Multiline Text....";
myText=myText.replace("\n","\13");
This simply removed the newlines and I could not see the newline in output text.
Also below did not work(it also submits form at line breaks):
String myText="Some Multiline Text....";
myText=myText.replace("\n","\r");
So how do I go about with newlines in sendkeys without submitting the form?