Interview Questions

Selenium WebDriver - How to type text in a new line inside a text area ?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - How to type text in a new line inside a text area ?

Use \n for new line.
ex- webelement.sendKeys(“Sanjay_Line1.\n Sanjay_Line2.”);
1

ex- webelement.sendKeys(“Sanjay_Line1.\n Sanjay_Line2.”);

it will type in text box as-
Sanjay_Line1.
Sanjay_Line2.

(Continued on next question...)

Other Interview Questions