在使用selenium webdriver +python 的过程中遇见了许多的问题,这些问题在网上都没有找到很好的答案,后来在看selenium IDE的时候发现这里面有很好的解决方法,写写、记记。 selenium IDE的操作很简单,主要是通过添加操作、定位、属性值进行的。 在sele...
分类:
其他好文 时间:
2014-11-14 17:35:27
阅读次数:
347
5 different ways to refresh a webpage using Selenium Webdriver Here are the 5 different ways, using which we can refresh a webpage.There might be even...
分类:
其他好文 时间:
2014-11-14 17:19:31
阅读次数:
108
#coding=utf-8
fromseleniumimportwebdriver
#fromselenium.webdriver.remoteimportswitch_to
#fromselenium.webdriver.commonimportalert
#importunittest
importtime,os
defusers_zidian():#用户名用例用一个字典实现参数化调用#
users={‘zhengshuheng‘:‘123456‘,‘609958331@..
分类:
编程语言 时间:
2014-11-11 23:02:04
阅读次数:
382
测试脚本是否支持在不同浏览器运行firefox浏览器运行脚本from selenium import webdriverdriver=webdriver.Firefox()driver.get("http://baidu.com")assert "sss" in driver.titledriver...
分类:
编程语言 时间:
2014-11-11 19:04:24
阅读次数:
241
#enconding:utf-8
require 'selenium-webdriver'
require 'rspec'
describe "baidu main page" do
it "should have 百度一下 button on the baidu main page"do
dr = Selenium::WebDriver.for:ie
url = 'www.baid...
分类:
其他好文 时间:
2014-11-10 23:21:48
阅读次数:
1334
在使用Selenium做自动化时,有的时候希望失败了进行截图,下面提供一个封装的截图方法,方便使用,代码如下://只需要传入文件名字即可,而这个名字大家可以直接使用测试的方法名public void captureScreenshot(String fileName) {String dirName...
分类:
Web程序 时间:
2014-11-10 21:36:59
阅读次数:
281
使用webdriver的时候,select控件经常会绑定onchange事件,在selenium2.09之前click方法对onchange事件有bug,2.09以后修复了,但是根据经验也遇到用seleniumui下面的select的类去做select操作,有时也可能不发触发onchange事件,所...
分类:
Web程序 时间:
2014-11-10 21:17:26
阅读次数:
215
在2014年的双11即将来临之季,爱编程小编为大家整理10款纯css3实现的按钮。希望这对坚守在前端的码农们有所帮助。亲,如果你有好的资源也可在本文留言,让从事编码的程序员们抱团。工作更轻松。No1.一款基于css3非常实用的鼠标悬停特效这款特效,当鼠标经过时候一个半透明的遮罩层倒下来。效果很好,而...
分类:
Web程序 时间:
2014-11-10 19:38:52
阅读次数:
258
link 有链接属性时visited 链接地址已被访问过active 被用户激活(在鼠标点击与释放之间发生的事件)hover 其鼠标悬停 a标签的四个伪类 这是一个超链接 可以采用 LOVE AND HATE的方式方便记忆
分类:
其他好文 时间:
2014-11-10 17:10:02
阅读次数:
237
#coding=utf-8
fromseleniumimportwebdriver
fromselenium.webdriver.common.byimportBy
fromselenium.webdriver.commonimportkeys
fromselenium.webdriver.supportimportselect
fromselenium.commonimportexceptions
importunittest,time,re
classBaidu(unittest.TestCase):
#..
分类:
编程语言 时间:
2014-11-10 01:16:19
阅读次数:
534