How to type text into a text field using Ruby Selenium Webdriver?

0 votes
How to type text into a text field using Ruby Selenium Webdriver?
Aug 26 in Selenium by Lily
84 views

1 answer to this question.

0 votes

Hi Lily, to type text into a textfield using Ruby Selenium Webdriver, you can use send_keys method. This method basically takes your keyboard input and writes it into the identified textfield. Following example shows how to do that:

driver = Selenium::WebDriver.for :firefox

driver.navigate.to "https://www.facebook.com"

el = driver.find_element(:id, "email")

el.clear

el.send_keys "abha.rathour@edureka.co" #send_keys method takes the keyboard inputs
answered Aug 26 by Abha
• 24,400 points

Related Questions In Selenium

0 votes
1 answer

How to enter text into text field using Selenium WebDriver

You can use the same code as ...READ MORE

answered Jul 6, 2018 in Selenium by Meci Matt
• 9,420 points
1,192 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
755 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
999 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
712 views
0 votes
1 answer

How to type text in a new line inside a text area using Selenium Webdriver?

Hey Unnati, '\n' is usually used to type text ...READ MORE

answered Jun 25 in Selenium by Abha
• 24,400 points
204 views
0 votes
1 answer