码迷,mamicode.com
首页 >  
搜索关键字:selenium 2    ( 6249个结果
Selenium->定位页面元素
注意:selenium-webdriver通过findElement() findElements()等find方法调用"By"对象来定位和查询元素。By类只是提供查询的方式进行分类。findElement返回一个元素对象否则抛出异常,findElements返回符合条件的元素List,如果不存在符...
分类:其他好文   时间:2014-11-18 17:51:07    阅读次数:249
Selenium->打开和关闭浏览器
一.打开浏览器,两种方式(1)打开默认路径的firefoxWebDriver driver = new FirefoxDriver();(2)打开指定路径的firefox,方法1如果FF没有安装在默认路径上,可以使用该方法System.setProperty("webdriver.firefox.b...
分类:其他好文   时间:2014-11-18 15:54:41    阅读次数:193
Selenium 模拟人输入
public static void type(WebElement e,String str) throws InterruptedException { String[] singleCharacters = str.split(""); // Interva...
分类:其他好文   时间:2014-11-17 19:22:52    阅读次数:222
Python结合selenium自动领取无忧币的脚本
首先申明,我并没有使用此脚本来恶意领取无忧币,不要封我账号啊,呵呵,我记得以前在oschina上找到过一个可以领取无忧币的脚本,但是据说已经失恋了,最近看了点关于selenium的书,这个玩意是做web测试方面,据说很流弊,于是巴拉巴拉看了点,然后试着写了个脚本,看看能不能..
分类:编程语言   时间:2014-11-15 06:46:04    阅读次数:198
seleniu IDE 点点滴滴
在使用selenium webdriver +python 的过程中遇见了许多的问题,这些问题在网上都没有找到很好的答案,后来在看selenium IDE的时候发现这里面有很好的解决方法,写写、记记。 selenium IDE的操作很简单,主要是通过添加操作、定位、属性值进行的。 在sele...
分类:其他好文   时间:2014-11-14 17:35:27    阅读次数:347
[Selenium]刷新页面 Refresh page
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
用Python selenium+webdriver的一个简单的登录自动化测试--豆丁网登录测试
#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
python-selenium之firefox、Chrome、Ie运行
测试脚本是否支持在不同浏览器运行firefox浏览器运行脚本from selenium import webdriverdriver=webdriver.Firefox()driver.get("http://baidu.com")assert "sss" in driver.titledriver...
分类:编程语言   时间:2014-11-11 19:04:24    阅读次数:241
Ruby之Rspec的报错解决
#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 Webdriver 截图
在使用Selenium做自动化时,有的时候希望失败了进行截图,下面提供一个封装的截图方法,方便使用,代码如下://只需要传入文件名字即可,而这个名字大家可以直接使用测试的方法名public void captureScreenshot(String fileName) {String dirName...
分类:Web程序   时间:2014-11-10 21:36:59    阅读次数:281
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!