<reponame>rpoliselit/python-for-dummies
"""
https://seleniumhq.github.io/selenium/docs/api/py/
open a new Firefox browser
load the Yahoo homepage
search for “seleniumhq”
"""

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

browser = webdriver.Firefox()

browser.get('http://www.yahoo.com')
assert 'Yahoo' in browser.title

elem = browser.find_element_by_name('p')  # Find the search box
elem.send_keys('seleniumhq' + Keys.RETURN)

"""
https://seleniumhq.github.io/selenium/docs/api/py/
open a new Firefox browser
load the Yahoo homepage
search for “seleniumhq”
"""

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

browser = webdriver.Firefox()

browser.get('http://www.yahoo.com')
assert 'Yahoo' in browser.title

elem = browser.find_element_by_name('p')  # Find the search box
elem.send_keys('seleniumhq' + Keys.RETURN)
https://seleniumhq.github.io/selenium/docs/api/py/ open a new Firefox browser load the Yahoo homepage search for “seleniumhq” # Find the search box