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
1,931 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, 2019 by Abha
• 28,060 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
13,000 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 24, 2019 in Selenium by Abha
• 28,060 points
19,836 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,060 points
570 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,520 points
5,336 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,050 points
6,016 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,890 points
3,727 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 2, 2020 in Selenium by Sri
• 3,050 points
4,535 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,060 points
6,816 views
0 votes
1 answer