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, 2019 in Selenium by Lily
4,449 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 27, 2019 by Abha
• 28,140 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,460 points
16,487 views
+1 vote
4 answers

How to get typed text from a textbox by using Selenium Webdriver?

Hey Ashmita, to get the typed text ...READ MORE

answered Jun 25, 2019 in Selenium by Abha
• 28,140 points
40,004 views
0 votes
1 answer

How to run a test case on remote webdriver using ruby selenium?

Hey Dhanush, you can follow the below ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,140 points
1,566 views
0 votes
1 answer
0 votes
2 answers

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,500 points
13,776 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,191 views
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,910 points
7,267 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,904 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, 2019 in Selenium by Abha
• 28,140 points
14,011 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP