Skip to content

Instantly share code, notes, and snippets.

@ywchiu
Created January 11, 2015 09:25
Show Gist options
  • Save ywchiu/8dfb481efd0d711c7a5a to your computer and use it in GitHub Desktop.
Save ywchiu/8dfb481efd0d711c7a5a to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from selenium import selenium
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import time
browser = webdriver.Firefox()
#browser = webdriver.Ie('IEDriverServer.exe')
browser.get('http://jirs.judicial.gov.tw/FJUD/FJUDQRY01_1.aspx')
time.sleep(3)
elem = browser.find_element_by_name("dy1")
elem.send_keys(u'103' + Keys.RETURN)
print browser.find_element_by_tag_name("body").text
browser.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment