The page I\'m looking at contains :
text 1 text 2 text 3 text 4
text 1
text 4
The selected answer does not work in Python 3 at the time of writing. Instead use this:
from selenium import webdriver wd = webdriver.Firefox() wd.get(url) return wd.execute_script('return window.document.getElementById('1').innerHTML')