im using the selemium to extract data .i need to select all the text and copy to the variable .but it select all the text but it not copying.any can help this?
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get('https://en.wikipedia.org/wiki/Apple_Inc.')
element=driver.find_element_by_css_selector('body')
all_text=element.send_keys(Keys.CONTROL+'a')
copy=element.send_keys(Keys.CONTROL+'c')
print copy
driver.close()
all the text? Entire html?cntrl+abut if you want to _...copy the text... @Infern0 Answer looks just perfect to cater to your requirement. Let me know if you are looking for something else.