码迷,mamicode.com
首页 >  
搜索关键字:selenium webdriver    ( 6806个结果
Selenium->返回页面的相关信息
一、返回当前页面的titlepublic static void main(String[] args) { String url = "http://www.baidu.com"; WebDriver driver = new FirefoxDriver(); ...
分类:其他好文   时间:2014-11-18 23:20:01    阅读次数:311
Selenium->iframe的处理
有时候我们在定位一个页面元素的时候发现一直定位不了,反复检查自己写的定位器没有任何问题,代码也没有任何问题。这时你就要看一下这个页面元素是否在一个iframe中,这可能就是找不到的原因之一。如果你在一个default content中查找一个在iframe中的元素,那肯定是找不到的。反之你在一个if...
分类:其他好文   时间:2014-11-18 23:14:52    阅读次数:140
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
WebDriver启动IE浏览器报Browser zoom level...错误!
Q:启动IE浏览器时突然报下面错误,不能正常使用。 WebDriverException: Message: Unexpected error launching Internet Explorer. Browser zoom level was set to 94%. It should be s...
分类:Web程序   时间:2014-11-15 00:07:17    阅读次数:499
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!