Selenium Python 致友自动登陆
来源:互联网 发布:软件测试研究 编辑:程序博客网 时间:2024/04/30 11:51
@沈佳龙
显然Python的效率更高啊~
#simple Example For Selenium By Python
#_*_ coding:UTF-8 _*_
__author__ = 'archer
from selenium import webdriver
from selenium.common.exceptions import *
import time
class SomeTest(object):
def __init__(self):
pass
def myfirsttest(self,myurl):
'start url'
browser=webdriver.Firefox()
browser.get(myurl)
'Start to Find a element'
try:
myemail=browser.find_element_by_id('email')
mypass=browser.find_element_by_id('password')
myloginbutton=browser.find_element_by_class_name('login-submit')
except NoSuchElementException:
assert 0,'找不到元素'
else:
myemail.send_keys('gongtianyu@kedacom.com')
mypass.send_keys('**********')
myloginbutton.click()
time.sleep(2)
if __name__=='__main__':
mytest=SomeTest()
mytest.myfirsttest('http://weibo.kedacom.com')
- Selenium Python 致友自动登陆
- selenium python cookie 自动登陆
- 基于python 3 的selenium模块实现网页自动登陆
- 【python 爬虫】linux 下 selenium+phantomjs 自动模拟登陆
- selenium、python模拟登陆淘宝
- Python+Selenium友盟自动版本选择
- 【selenium】Windows平台下使用python自动登陆网关 (更新至 v1.1.0)
- python 自动登陆oschina
- python 实现自动登陆
- Python Selenium 自动测试网页
- selenium+python自动登录脚本
- python+Selenium自动签到实例
- selenium+python实例详解:邮箱登陆
- [python爬虫]selenium+PhantomJS模拟登陆
- python+selenium+phantomjs 模拟淘宝登陆
- selenium+python模拟登陆163邮箱
- python selenium网络爬虫 模拟登陆
- python+selenium实现登陆保存cookie
- mysql 如何将行数插入到数据库
- Co-regularized PLSA for Multi-view Clustering
- Android NDK开发入门篇
- 解决Chrome代理proxy switchy无法使用方法
- STL容器 vector,list,deque 性能比较
- Selenium Python 致友自动登陆
- delphi中@ 什么意思
- java web进阶篇(九) Struts基础开发
- 多点触摸和手势检测
- Android的账号与同步机制
- boost.serialization中基类指针容器存子类对象的序列化
- MFC 获取当前对话框生成的对象指针
- 基于VSFTP的本地YUM源及光盘YUM源搭建
- [LeetCode]—Roman to Integer 罗马数字转阿拉伯数字