[selenium ]selenium 自动登录考勤系统
来源:互联网 发布:什么是oracle元数据 编辑:程序博客网 时间:2024/05/21 17:07
使用selenium 的python包,然后实现了简单的自动登录和查看所需的页面。
脚本写起来很简单,需要会使用浏览器的debug功能,分析下页面结构。这个例子只是简单参考,应该无法运行,因为是内部系统。。
# -*- coding: utf-8 -*-#get_info_of_working.py python2.7.x#orangleliu@gmail.com 2014-04-24'''用来自动打开查询工时的界面 直接看到自己最近的打卡情况'''from selenium import webdriverfrom selenium.webdriver.common.keys import Keysdef login_system(driver): ''' 登陆到考勤管理系统 ''' login_url = 'http://att.xx.com/' username = 'zhizhi.liu' password = '1234' driver.get(login_url) driver.find_element_by_id("username").clear() driver.find_element_by_id("username").send_keys(username) driver.find_element_by_id("password").clear() driver.find_element_by_id("password").send_keys(password) driver.find_elements_by_tag_name("form")[0].submit() driver.get('http://att.xx.com/TRecordList.action')if __name__ == "__main__": driver = webdriver.Firefox() login_system(driver)
0 0
- [selenium ]selenium 自动登录考勤系统
- selenium+python自动登录脚本
- Python实现Selenium实现自动登录CSDN
- Python Selenium实现自动登录163邮箱
- Selenium
- Selenium
- Selenium
- selenium
- Selenium
- Selenium
- selenium
- selenium
- Selenium
- selenium
- Selenium
- Selenium
- Selenium
- Selenium
- 自己电脑做网站服务器
- WINFORM中怎样使DATAGRIDVIEW的某一列可以添加两个BUTTON控件
- easy ui 查询的时候遇到的问题
- 四叉树空间索引
- 【jQuery学习笔记----操作样式表】
- [selenium ]selenium 自动登录考勤系统
- SSH框架
- javascript高级程序设计笔记(三)
- mini2440编译x86-qtopia(x86-qtopia)(友善之臂)
- 我在Github上的flare-spark项目
- ios中SQLite3的基本操作
- 向shell脚本传参方法
- Oracle11g TAF 实例测试
- Android入门:广播发送者与广播接收者