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
117 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
• 27,740 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
288 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,010 points
469 views
0 votes
1 answer
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,010 points
399 views
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,510 points
1,543 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,850 points
1,486 views
+1 vote
1 answer

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
• 27,740 points
2,511 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
• 27,740 points
1,213 views