#Selenium

CentOS + Selenium 用法小结

使用场景在CentOS下使用Selenium,这里的CentOS是指无GUI的Server版,其特殊性在于,没有可以供输出的显示界面,除了常见的headless方法以外,还有xvfb等工具可以使用,本文即记录我使用时碰到的一些流程及坑点。解决方案headless方法的使用pipinstallseleniumwgetht...

selenium测试(Java)-- 显式等待(九)

显式等待可以使用selenium预置的判断方法,也可以使用自定义的方法。packagecom.test.elementwait;importorg.openqa.selenium.By;importorg.openqa.selenium.WebDriver;importorg.openqa.selenium.firef...

selenium测试(Java)-- 验证信息(八)

packagecom.test.validationinfor;importorg.openqa.selenium.WebDriver;importorg.openqa.selenium.firefox.FirefoxDriver;publicclassValidationInformation{publicstati...

selenium测试(Java)-- 键盘事件(七)

 1packagecom.test.key;23importorg.openqa.selenium.By;4importorg.openqa.selenium.Keys;5importorg.openqa.selenium.WebDriver;6importorg.openqa.selenium.firefo...

selenium测试(Java)--鼠标事件(六)

鼠标操作:1.右击2.双击3.拖到4.悬停  1packagecom.test.mouse;23importjava.io.File;45importorg.openqa.selenium.By;6importorg.openqa.selenium.WebDriver;7importorg.open...

selenium测试(Java)--元素操作(五)

元素的操作有1.清除文本2.模拟按键输入3.单击元素4.返回元素尺寸5.获取文本6.获取属性值7.判断是否可见8.提交  下面通过操作新浪邮箱的注册界面的脚本来展示使用方法 源代码:1packagecom.test.elementoperation;23importorg.openqa.s...

selenium测试(Java)--浏览器控制(四)

1.控制浏览器窗口大小 1packagecom.test.window;23importorg.openqa.selenium.Dimension;4importorg.openqa.selenium.WebDriver;5importorg.openqa.selenium.firefox.FirefoxDr...

selenium测试(Java)(三)

   控制浏览器:http://www.cnblogs.com/moonpool/p/5657752.html...
代码星球 代码星球·2021-02-24

selenium定位方法(java实例)(二)

从下图中可以看到selenium有三类定位元素的方法,一种是直接通过属性、标签以及链接来定位,一种是XPath方式,最后一种是CSS方式。 下表列举了元素定位的例子selenium之页面元素定位方法  方法 例子  通过ID来定位 WebElemen...

selenium测试环境搭建(一)

selenium测试环境搭建 下载资源1. selenium-java-2.53.0.zip下载地址:http://pan.baidu.com/s/1dFDf27Z2. FirefoxSetup45.1.1esr.exe下载地址:http://pan.baidu.com/s/1hsPQBi...

selenium:chromedriver与chrome版本的对应关系

转自:http://blog.csdn.NET/huilan_same/article/details/51896672再使用selenium打开chrome浏览器的时候,需要用chromedriver,而chromedriver与chrome的版本也是要相互适宜的,对应关系如下:chromedriver版本支持的Ch...

selenium使用中遇到的问题

1、Exceptioninthread"main"org.openqa.selenium.WebDriverException:CannotfindfirefoxbinaryinPATH.Makesurefirefoxisinstalled.OSappearstobe:XPBuildinfo:version:'2.16...

selenium运行火狐报错FirefoxDriver : Unable to connect to host 127.0.0.1 on port 7055

摘要:这是个常见的启动firefoxdriver的问题,具体的错误日志如下,其实原因很简单,就是你的Selenium版本和firefox不兼容了。Firefox版本太高了,请及时查看你安装的firefox版本.检查你的seleniumjar包版本... 成功案例:selenium2.52.0==〉Firefo...

Could not contact Selenium Server; have you started it on 'localhost:4444'

今天学习selenium RC例子的时候遇到一个问题:java.lang.RuntimeException:CouldnotcontactSelenium Server;haveyoustartediton'localhost:4444'?Connectionrefused:connectatcom...

Self_Java + Selenium + Maven 环境搭建步骤

转自:http://www.jianshu.com/p/3c05e8c9ee81我们使用Java+SeleniumWebDriver来进行环境的搭建,同样分为两个部分:安装Java和intellijIDEA引入指定Selenium的Maven使用的pom.xml文件Maven是一个用于项目构建的工具,通过它便捷的管理项...
首页上一页12345...下一页尾页