Reputation: 71
I wanted to pass multiple words in different line on to text box, can anyone help me finding out the solution
Expected output :
13456,Teena
12378,Tesa
130987,Jhon
Upvotes: 0
Views: 1167
Reputation: 68
textbox.sendKeys("13456,Teena" + Keys.SHIFT + Keys.ENTER + "12378,Tesa" + Keys.SHIFT + Keys.ENTER + "130987,Jhon");
Use Keys.SHIFT + Keys.ENTER combination to the sendKeys() method.
Similarly, we can use Keys enum for different non-text keys and pass them to the sendKeys method. The following table has an entry for each of the non-text key present in a keyboard.
Refer - https://artoftesting.com/press-enter-tab-space-arrow-function-keys-in-selenium-webdriver-with-java
Upvotes: 1