Webdriver API中文版】的更多相关文章

Webdriver API中文版 1.1   下载selenium2.0的lib包 http://code.google.com/p/selenium/downloads/list 官方UserGuide:http://seleniumhq.org/docs/ 1.2   用webdriver打开一个浏览器 我们常用的浏览器有firefox和IE两种,firefox是selenium支持得比较成熟的浏览器.但是做页面的测试,速度通常很慢,严重影 响持续集成的速度,这个时候建议使用HtmlUnit…
一般来说,所有有趣的操作与页面交互都将通过 WebElement 接口,包括上一节中介绍的对象定位,以及本节中需要介绍的常对象操作.webdriver 中比较常用的操作元素的方法有下面几个: clear 清除元素的内容,如果可以的话 send_keys 在元素上模拟按键输入 click 单击元素 submit 提交表单3.1.登录实例下面以快播私有云登录实例来展示常见元素操作的使用:#coding=utf-8from selenium import webdriverdriver = w…
(转载) 1.3 打开测试页面 对页面对测试,首先要打开被测试页面的地址(如:http://www.google.com),web driver 提供的get方法可以打开一个页面: // And now use thedriver to visit Google driver.get("http://www.google.com"); 1.4   例子 package org.openqa.selenium.example; import org.openqa.selenium.By;…
JAVA  JDK 1.6 API中文版.CHM打开chm提示,“ 已取消到该网页的导航” silent fish 装了win7后,打开chm文件,发现很多在xp系统打开正常的chm文件竟然出现问题,提示“已取消到该网页的导航” 找了问题,提供以下2个方法: 方法 11. 双击此 .chm 文件.2. 在“打开文件安全警告”对话框,单击以清除“打开此文件前始终询问”复选框.3. 单击“打开”. 方法 21. 右键单击该 CHM 文件,然后单击“属性”.2. 单击“取消阻止”或者“解除锁定”.3.…
Zepto,Zepto API 中文版,Zepto 中文手册,Zepto API,Zepto API 中文版,Zepto 中文手册,Zepto API 1.0, Zepto API 1.0 中文版,Zepto 1.0 中文手册,Zepto 1.0 API-translate by yaotaiyang Zepto是一个轻量级的针对现代高级浏览器的JavaScript库, 它与jquery有着类似的api. 如果你会用jquery,那么你也会用zepto. 设计的目的是提供jquery的类似的AP…
selenium2(WebDriver) API 作者:Glen.He出处:http://www.cnblogs.com/puresoul/  1.1  下载selenium2.0的包 官方download包地址:http://code.google.com/p/selenium/downloads/list 官方User Guide:  http://seleniumhq.org/docs/ 官方API:  http://selenium.googlecode.com/git/docs/api…
由于web自动化常常需要控制浏览器行为和操作页面元素,相关函数又比较多,于是再此记下一份Webdriver API查阅文档以备不时之需. 参考:虫师<Selenium2自动化测试实战>,和http://selenium-python.readthedocs.io/api.html #coding=utf-8 from selenium import webdriver driver=webdriver.Firefox() driver.get('http://www.baidu.com/')…
1.1   下载selenium2.0的lib包 http://code.google.com/p/selenium/downloads/list 官方UserGuide:http://seleniumhq.org/docs/ 1.2   用webdriver打开一个浏览器 我们常用的浏览器有firefox和IE两种,firefox是selenium支持得比较成熟的浏览器.但是做页面的测试,速度通常很慢,严重影 响持续集成的速度,这个时候建议使用HtmlUnit,不过HtmlUnitDirver…
2.1 操作元素基本方法 前言前面已经把环境搭建好了,从这篇开始,正式学习selenium的webdriver框架.我们平常说的 selenium自动化,其实它并不是类似于QTP之类的有GUI界面的可视化工具,我们要学的是webdriver框架的API.本篇主要讲如何用Python调用webdriver框架的API,对浏览器做一些常规的操作,如打开.前进.后退.刷新.设置窗口大小.截屏.退出等操作. 2.1.1 打开网页 1.从selenium里面导入webdriver模块2.打开Firefox…
之前一直没有系统的梳理WebDriver Api的相关知识,今天借此机会整理一下. 1.页面元素定位 1.1.8种常用定位方法 # id定位 driver.find_element_by_id() # name定位 driver.find_element_by_name() # className定位 driver.find_element_by_class_name() # tag定位 driver.find_element_by_tag_name() # link定位 driver.find…
文档原始链接为:https://web3.learnblockchain.cn/0.2x.x/,欢迎大家前往查阅,本文只是节选开头部分的介绍及API列表索引,以下为翻译正文: 为了开发一个基于以太坊的去中心化应用程序,可以使用web3.js库提供的web3对象, 在底层实现上,web3通过RPC调用与本地节点通信, web3.js可以与任何暴露了RPC接口的以太坊节点连接. web3 包含下面几个对象: web3.eth 用来与以太坊区块链及合约的交互 web3.shh 用来与Whisper协议…
2.28 查看webdriver API(带翻译) 前言    前面都是点点滴滴的介绍selenium的一些api使用方法,那么selenium的api到底有多少呢?本篇就教大家如何去查看selenium api,不求人,无需伸手找人要,在自己电脑就有.    pydoc是Python自带的模块,主要用于从python模块中自动生成文档,这些文档可以基于文本呈现的.也可以生成WEB 页面的,还可以在服务器上以浏览器的方式呈现!一.pydoc    1.到底什么是pydoc? ,这个是准确的解释:…
在火狐浏览器33版本,python2.7运行selenium webdriver api报错:SessionNotCreatedException: Message: Unable to find a matching set of capabilities 网上搜了一下,说可以升级浏览器版本到52以上,我升级到了55版本,没有报错了 解决办法:Update Firefox to version >= 52.0.3,更新Firefox版本52.0.3以上 可能也与geckodriver的版本有关…
配置完的环境之后,我们先来写一个小脚本: # __Author__:"Jim_xie" from selenium import webdriver from time import sleep #打开浏览器 driver = webdriver.Chrome() #以get方法打开指定浏览器 driver.get('http://music.163.com') #注意URL以HTTP开头 #等待3秒 sleep(3) #关闭浏览器 driver.close() 注:建议在开始sele…
1.1  下载selenium2.0的包 官方download包地址:http://code.google.com/p/selenium/downloads/list 官方User Guide:  http://seleniumhq.org/docs/ 官方API:  http://selenium.googlecode.com/git/docs/api/java/index.html 1.2.1  用webdriver打开一个浏览器 打开firefox浏览器: WebDriver driver…
本节主要详细描述WebDriver的常用API使用方法. 1.访问某网页地址 被测试网页的网址:http://www.sogou.com. Java语言版本的API实例代码: 方法1: public static void visitURL(){ String baseUrl="http://www.sogou.com"; driver.get(baseUrl); } 方法2: public static void visitURL(){ String baseUrl="ht…
16.操作单选框 被测试的网页为Demo1. Java语言版本的API实例代码: public static void operateRadio(){ driver.get("file:///D:/%E6%95%99%E5%AD%A6/2015-2016-2/%E8%AF%BE%E4%BB%B6/w9/SeleniumDemo/files/Demo1/demo.html"); driver.manage().window().maximize(); WebElement radioOp…
31.判断页面元素是否存在 public static void testElementExist(){ driver.get("http://www.sogou.com"); try{ driver.findElement(By.id("query")); System.out.println("element is found."); }catch(NoSuchElementException e){ System.out.println(&…
本章涉及Selenium WebDriver的所有接口. Recommended Import Style 推荐的导入风格如下: from selenium import webdriver 然后,你可以这样访问所有的类: webdriver.Firefox webdriver.FirefoxProfile webdriver.Chrome webdriver.ChromeOptions webdriver.Ie webdriver.Opera webdriver.PhantomJS webdr…
(转载) 1.1  下载selenium2.0的包 官方download包地址:http://code.google.com/p/selenium/downloads/list 官方User Guide:  http://seleniumhq.org/docs/ 官方API:  http://selenium.googlecode.com/git/docs/api/java/index.html 1.2.1  用webdriver打开一个浏览器 打开firefox浏览器: WebDriver d…
由于API文档格式不太适合cnblog博客,暂且翻译一部分,且暂未校对 注意:这不是官方文档,官方 API文档在这里. 本章包含Selenium WebDriver的所有接口 推荐import风格 本章中的API第一显示的都是类的绝对位置.然而,要推荐的是下面这种import风格: from selenium import webdriver 接着,你可以像下面这样访问其中的类: webdriver.Firefox webdriver.FirefoxProfile webdriver.Chrom…
Appium_Python_Api文档 1.contextscontexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5页面的控件 :Usage: driver.contexts 用法 driver.contexts 2. current_contextcurrent_context(self): Returns the current context of the current s…
This chapter cover all the interfaces of Selenium WebDriver. Recommended Import Style The API definitions in this chapter shows the absolute location of classes. However the recommended import style is as given below: from selenium import webdriver T…
三十一.使用页面的文字内容识别和处理新弹出的浏览器窗口 被测试网页的HTML源码: <html> <head> <meta charset="UTF-8" content="text/html"> <title>你喜欢的水果</title> </head> <body> <p id="p1">你爱吃的水果么?</p> <br>&…
二十一.模拟鼠标右键事件 被测试网页的网址: http://www.sogou.com Java语言版本的API实例代码: package test; import org.testng.annotations.Test; import org.testng.annotations.BeforeMethod; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.seleniu…
十一.双击某个元素 被测试网页的html源码: <html> <head> <meta charset="UTF-8"> </head> <body> <input type="text" id="inputBox" ondblclick="javascript:this.style.background='red'">请双击</input>…
一.访问某网页地址 被测试网页的网址: http://www.baidu.com Java语言版本的API实例代码: 方法1: package test; import org.testng.annotations.Test; import org.testng.annotations.BeforeMethod; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import…
本系列主要讲解webdriver常用的API使用方法(注意:使用前请确认环境是否安装成功,浏览器驱动是否与谷歌浏览器版本对应) 一:获取页面元素的文本内容:text 例:获取我的博客名字文本内容 代码: from selenium import webdriver # 导入webdriverimport timedriver = webdriver.Chrome() # 实例化driver.get('https://www.cnblogs.com/kevin-liutianping/') # 打…
本系列主要讲解webdriver常用的API使用方法(注意:使用前请确认环境是否安装成功,浏览器驱动是否与谷歌浏览器版本对应) 一:获取当前页面的title(一般获取title用于断言) from selenium import webdriver # 导入webdriverimport timedriver = webdriver.Chrome() # 实例化driver.get('https://www.cnblogs.com/kevin-liutianping/') # 打开我的博客园ti…
本系列主要讲解webdriver常用的API使用方法(注意:使用前请确认环境是否安装成功,浏览器驱动是否与谷歌浏览器版本对应) 一:打开某个网址:get() from selenium import webdriver # 导入webdriverdriver = webdriver.Chrome() # 实例化driver.get('https://www.cnblogs.com/kevin-liutianping/') # 打开我的博客首页driver.quit() # 关闭浏览器进程 二:网…