splinter(python操作浏览器魔魁啊)
from splinter import Browser
def main():
browser = Browser()
browser.visit('http://google.com')
browser.fill('q', 'splinter - python acceptance testing for web applications')
button = browser.find_by_name('btnK')
button.click()
if browser.is_text_present('splinter.cobrateam.info'):
print 'yes, the official website was found!'
else:
print "No, it wasn't found... We need o improve our SEO techniques"
browser.quit()
if __name__ == '__main__':
main()
开源学习,互动进步
posted on 2016-05-14 10:22 Bug__Killer 阅读(565) 评论(0) 编辑 收藏 举报