domingo, 31 de enero de 2016

Selenium / Java - How to enter text on a field of a webpage

Hello!
To type text on a textbox of a webpage, you first need to click on it and then send the text to be displayed. Like this:
 
driver.findElement(By.xpath("XPATH")).click();                    driver.findElement(By.xpath("XPATH")).sendKeys("Hello world!");

Done!
Share this post with a friend!

No hay comentarios.:

Publicar un comentario