Skip to content

Instantly share code, notes, and snippets.

@hidepin
Created March 13, 2016 07:41
Show Gist options
  • Save hidepin/a3bda8d779d5a48cb4d8 to your computer and use it in GitHub Desktop.
Save hidepin/a3bda8d779d5a48cb4d8 to your computer and use it in GitHub Desktop.
selenium-python
import time
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote(
command_executor='http://192.168.137.225:4444/wd/hub',
desired_capabilities=DesiredCapabilities.FIREFOX)
driver.get('https://www.google.co.jp')
searchBox = driver.find_element_by_name('q')
searchBox.send_keys('packet')
searchBox.submit()
time.sleep(5.0)
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment