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
2,045 views

1 answer to this question.

0 votes

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,020 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 28, 2019 in Selenium by Shreya
1,274 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
1,720 views
0 votes
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 30, 2019 in Selenium by Abha
• 28,020 points
2,091 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
5,771 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,520 points
4,884 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,010 points
5,689 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,470 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,020 points
17,758 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,020 points
9,227 views