python splinter】的更多相关文章

python+splinter实现12306网站刷票并自动购票流程 通过python+splinter,实现在12306网站刷票并自动购票流程(无法自动识别验证码). 此类程序只是提高了12306网站的 <查询> 刷新频率(默认自动查询的刷新频率为5秒).对于学习splinter感觉还是不错的,但是想通过装个类似刷票程序成功购票的 还是多花点钱升级升级硬件设备,提高提高网速吧. 程序写的有点乱,随时修改ing. #!/usr/bin/env python3# encoding: utf-8  …
今天无意间看到了splinter. Splinter是一个使用Python开发的开源Web应用测试工具.它可以帮你实现自动浏览站点和与其进行交互. Splinter对已有的自动化工具(如:Selenium.PhantomJS和zope.testbrowser)进行抽象,形成一个全新的上层应用API,它使为Web应用编写自动化测试脚本变的更容易. 依赖包 编辑 Splinter0.7.2依赖以下包: Selenium(版本>=2.44.0) Django(版本>=1.5.8,<1.7) F…
from splinter.browser import Browser with Browser() as b: for url,name in web: b.visit(url) b.fill('Password','password') button=b.find_by_id('loginBtn') button.click() t=b.find_by_id('FreeSpaceId') print name,t.text tab=b.find_by_id('login-table') t…
http://chromedriver.storage.googleapis.com/index.html…
当你想查询一下火车票信息的时候,你还在上12306官网吗?或是打开你手机里的APP?下面让我们来用Python写一个命令行版的火车票查看器, 只要在命令行敲一行命令就能获得你想要的火车票信息!如果你刚掌握了Python基础,这将是个不错的小练习. 接口设计 一个应用写出来最终是要给人使用的,哪怕只是给你自己使用.所以,首先应该想想你希望怎么使用它?让我们先给这个小应用起个名字吧,既然及查询票务信息,那就叫它tickets好了.我们希望用户只要输入出发站,到达站以及日期就让就能获得想要的信息,所以…
一. 代码使用Python+Splinter开发,Splinter是一个使用Python开发的开源Web应用测试工具,它可以帮你实现自动浏览站点和与其进行交互. 二. 安装好Python 3或2都可以,然后安装Splinter `pip install Splinter 三. Splinter注意事项 1. Splinter的Browser类默认优先使用firefox,所以用chrome的话,需要指定driver_name="chrome",只要养成一个习惯,不管用什么浏览器都指定,问…
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_pre…
开始学习使用splinter工具了,目前是摸索中,先熟悉splinter工具的使用方法~~ 实现功能: 打开firefox浏览器->www.baidu.com->输入关键词 python,进行搜索~~ from splinter import Browser import time def main(): browser = Browser() browser.visit('http://baidu.com') browser.fill('wd', 'python') button = bro…
Splinter是什么: 是一个用 Python 编写的 Web 应用程序进行验收测试的工具. Splinter执行的时候会自动打开你指定的浏览器,访问指定的URL,然后你所开发的模拟的任何行为,都会自动完成, 英文介绍: Splinter is an open source tool for testingweb applications using Python. It lets you automate browser actions, such asvisiting URLs and i…
Splinter 快速介绍 官方网站:http://splinter.cobrateam.info/ 官方介绍: Splinter is an open source tool for testingweb applications using Python. It lets you automate browser actions, such asvisiting URLs and interacting with their items 特性:1.可以模拟浏览器行为,访问指定的URL,并且可…