I'm trying to select a web attribute with python via webdriver, specifically I want to copy the name that I entered to the recipent, but I can't do.
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
import time
driver = webdriver.Chrome('C:\chromedriver.exe')
driver.get('https://www.gmail.com/')
driver.implicitly_wait(5)
loginBox = driver.find_element_by_xpath('//*[@id ="identifierId"]')
loginBox.send_keys('xxxxxxxxxxxxxxxxxx')
nextButton = driver.find_elements_by_xpath('//*[@id ="identifierNext"]')
nextButton[0].click()
passWordBox = driver.find_element_by_xpath('//*[@id ="password"]/div[1]/div / div[1]/input')
passWordBox.send_keys('xxxxxxxxxxxxx')
nextButton = driver.find_elements_by_xpath('//*[@id ="passwordNext"]')
nextButton[0].click()
time.sleep(2)
driver.get('https://mail.google.com/mail/u/0/#inbox?compose=new')
driver.find_element_by_xpath('//textarea[1]').send_keys('Grecia Abad del toro')
driver.find_element_by_xpath('//textarea[1]').send_keys(Keys.ENTER)
How can I literally select and copy the text that is in the mail recipient? Thanks very much.
