I am trying to enter space in the text box using send keys but it is not working instead when command is executed erasing the text
I am using following commands
driver.findElement(By.xpath("//android.widget.EditText[@text=‘Add tag…’]")).sendKeys(“Nails “) . driver.findElement(By.xpath(”//android.widget.EditText[@text=‘Add tag…’]”)).sendKeys(“Nails " +”\n") driver.findElement(By.xpath("//android.widget.EditText[@text=‘Add tag…’]")).sendKeys(“Nails " +” ")
and tried with adb commands as well
I am working on react native app.
and using appium latest version 1.9.1
Have you treid using Keys.SPACE or just sending your string with etxra space.
driver.findElement(By.xpath("//android.widget.EditText[@text=‘Add tag…’]")).sendKeys(“Nails“+Keys.SPACE);
Please try this and share if any exception is coming. .
ok, so after entering our text simply click outside somewhere or use extra sendKeys like this
driver.findElement(By.id(“yourID or whatever”)).sendKeys(Keys.ENTER); or Keys.RETURN and this should do what you expecting.
Well that is something unexpected because i have tested some of these kinds of textbox and that worked fine for me if i used driver.sendKeys(Keys.RETURN) after entering text.
Is that app available somewhere so that i can confirm that ? What is your platform IOS or android @Srinija