随笔分类 -  selenium

摘要:http://chromedriver.storage.googleapis.com/index.html 阅读全文
posted @ 2018-09-03 17:19 YunMan 阅读(544) 评论(0) 推荐(0) 编辑
摘要:http://ftp.mozilla.org/pub/firefox/releases/ 阅读全文
posted @ 2018-02-22 20:00 YunMan 阅读(313) 评论(0) 推荐(0) 编辑
摘要:http://selenium-release.storage.googleapis.com/index.html 阅读全文
posted @ 2018-02-22 17:13 YunMan 阅读(12343) 评论(0) 推荐(2) 编辑
摘要:摘要: 这是个常见的启动firefoxdriver的问题,具体的错误日志如下,其实原因很简单,就是你的Selenium版本和firefox 不兼容了。 Firefox 版本太高了, 请及时查看你安装的firefox版本. 检查你的selenium jar包版本 ... 这是个常见的启动firefox 阅读全文
posted @ 2018-02-02 22:48 YunMan 阅读(256) 评论(0) 推荐(0) 编辑
摘要:修改元素的style,主要是将一些隐性元素显示出来,让元素可被操作: JavascriptExecutor js = (JavascriptExecutor)driver; js.executeScript("document.getElementById('name').style.display 阅读全文
posted @ 2018-01-28 01:25 YunMan 阅读(1609) 评论(0) 推荐(0) 编辑
摘要:有时候我们会碰到一些元素不可见,这个时候selenium就无法对这些元素进行操作了。例如,下面的情况: 页面主要通过“display:none”来控制整个下拉框不可见。这个时候如果直接操作这个下拉框,就会提示: from selenium import webdriver from selenium 阅读全文
posted @ 2018-01-22 11:26 YunMan 阅读(1317) 评论(0) 推荐(0) 编辑
摘要:第一步 安装JDK 第二步 下载Eclipse 第三步 在Eclipse中安装TestNG 第四步 下载Selenium IDE、SeleniumRC、IEDriverServer 第五步 下载Firefox、安装Selenium IDE、firebug、Xpath checker、Xpath fi 阅读全文
posted @ 2017-11-24 16:09 YunMan 阅读(1556) 评论(0) 推荐(0) 编辑
摘要:接下来还是贴上一些相关代码 1. 可以设定多轮测试,每轮测试数据都不一样,测试数据来源于excel的sheet_2 阅读全文
posted @ 2017-11-24 16:06 YunMan 阅读(3475) 评论(0) 推荐(0) 编辑
摘要:1.元素比较明确(可视) 2.元素隐藏,需要鼠标移动到一定地方才显现(下图为某论坛列表,需要将鼠标移动到列表才显示操作按钮) 阅读全文
posted @ 2017-08-09 17:54 YunMan 阅读(1606) 评论(0) 推荐(0) 编辑
摘要:方法一: 经验证可行 方法二:直接通过js操作,不需要switchTo跳转,代码如下: String text = "a new post"; String js = "document.getElementById('Editor_Edit_EditorBody_ifr').contentDocu 阅读全文
posted @ 2017-08-07 17:36 YunMan 阅读(874) 评论(0) 推荐(0) 编辑
摘要:1、AutoIT介绍 AutoIT是一个类似脚本语言的软件,利用此软件我们可以方便的实现模拟键盘、鼠标、窗口等操作,实现自动化。 2、实现原理 利用AutoIT编写合适的脚本,然后将脚本编译成可执行文件,在自动化实现时,直接调用此脚本实现文件上传。 备注:编写脚本和编译,需要借助AutoIT提供的工 阅读全文
posted @ 2017-07-03 20:19 YunMan 阅读(3760) 评论(0) 推荐(2) 编辑
摘要: 阅读全文
posted @ 2017-06-28 15:38 YunMan 阅读(3174) 评论(0) 推荐(0) 编辑
摘要://操作js的confirm弹窗,bool控制是否点击确定,true为点击确定,false为点击取消 public static void OperaterJSOfConfirm(WebDriver driver,String str,Boolean bool) throws InterruptedException, AWTException{ WebElement ... 阅读全文
posted @ 2017-06-26 11:04 YunMan 阅读(5414) 评论(0) 推荐(0) 编辑
摘要:package exercises; import java.util.ArrayList; import java.util.List; import java.util.Set; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.Ch... 阅读全文
posted @ 2017-06-15 11:55 YunMan 阅读(540) 评论(0) 推荐(0) 编辑
摘要:在实现UI自动化测试过程中,有一类需求是实现图片上传,这种需求根据开发的实现方式,UI的实现方式也会不同。 一、直接利用Selenium实现 这种方式是最简单的一种实现方式,但是依赖于开发的实现。 当开发直接使用file类型的input实现图片文件的上传时,实例:<input type="file" 阅读全文
posted @ 2017-06-08 19:08 YunMan 阅读(1956) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-06-07 09:47 YunMan 阅读(631) 评论(0) 推荐(0) 编辑
摘要:经常使用到的键盘操作:send_keys(Keys.BACK_SPACE) 删除键(BackSpace)send_keys(Keys.SPACE) 空格键(Space)send_keys(Keys.TAB) 制表键(Tab)send_keys(Keys.ESCAPE) 回退键(Esc)send_ke 阅读全文
posted @ 2016-12-12 11:10 YunMan 阅读(448) 评论(0) 推荐(0) 编辑
摘要:ActionChains 类鼠标操作的常用方法: context_click() 右击 double_click() 双击 drag_and_drop() 拖动 move_to_element() 鼠标悬停在一个元素上 click_and_hold() 按下鼠标左键在一个元素上 #引入 A 阅读全文
posted @ 2016-12-12 10:21 YunMan 阅读(153) 评论(0) 推荐(0) 编辑
摘要:本文重点介绍使用Eclipse+pydev插件来写Python代码, 以及在Mac上配置Eclipse+Pydev 和Windows配置Eclipse+Pydev 编辑器:Python 自带的 IDLE 简单快捷, 学习Python或者编写小型软件的时候。非常有用。 编辑器: Eclipse + p 阅读全文
posted @ 2016-12-01 16:41 YunMan 阅读(170) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示