How can I fetch value text from a textbox by using Python Selenium Webdriver

0 votes
How can I fetch value/text from a textbox by using Python Selenium Webdriver?
Jul 30, 2019 in Selenium by Jagat
6,622 views

1 answer to this question.

+1 vote

Hey Jagat, following test script shows how to fetch value/text from a textbox using python selenium webdriver:

from selenium import webdriver

driver = webdriver.Firefox(executable_path=r"C:\Users\Abha_Rathour\Downloads\geckodriver\geckodriver.exe")
driver.implicitly_wait(2)
driver.maximize_window()

driver.get("https://www.gmail.com")

driver.find_element_by_id('identifierId').send_keys('abc.def@gmail.com')
text1 = driver.find_element_by_id('identifierId').get_property('value')

print(text1)
answered Jul 31, 2019 by Abha
• 28,140 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

How can I locate web elements from a web page using Selenium Webdriver?

Hey @Dushyant, Locating elements in WebDriver is ...READ MORE

answered May 29, 2019 in Selenium by Shreya
2,911 views
0 votes
1 answer

How can I clear the text in a text box using Selenium WebDriver?

Hello Akriti, you can clear the text ...READ MORE

answered May 29, 2019 in Selenium by Anvi
• 14,150 points
6,814 views
+1 vote
1 answer

Can I select multiple options from a dropdown using Python Selenium webdriver?

Hi Dhwani, you can use following code ...READ MORE

answered Jul 31, 2019 in Selenium by Abha
• 28,140 points
4,952 views
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8, 2019 in Selenium by Anvi
• 14,150 points
15,862 views
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,724 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,166 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,243 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
39,935 views
0 votes
1 answer

How can I select date from a datepicker div using Selenium Webdriver?

Hey Jeevika, you can use following automation ...READ MORE

answered Jul 15, 2019 in Selenium by Abha
• 28,140 points
12,190 views
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