
Selenium WebDriver
文章平均质量分 60
iSelenium
Love Test,Love Selenim。
展开
-
Getting Started with Page Object Pattern for Your Selenium Tests
转载:https://www.pluralsight.com/guides/getting-started-with-page-object-pattern-for-your-selenium-testsIntroductionAs with most software patterns, they really make the most sense once you have act...转载 2019-11-29 15:55:34 · 517 阅读 · 0 评论 -
自动化框架 FluentLenium 在全球化测试场景中的应用
转载:https://www.ibm.com/developerworks/cn/web/wa-lo-automated-framework-boilerplate/index.html引言在我们的日常工作当中,很多时候会遇到大量截图的工作任务。且由于我们要执行 TVT(Translation Verification Testing),所以同一组测试用例需要在不同的语言上实现截图。如果...转载 2019-11-26 11:03:41 · 601 阅读 · 0 评论 -
Selenium WebDriver在Chrome、firefox、IE浏览器上运行测试
Chrome浏览器 Chrome浏览器使用名为ChromeDriver.exe 的可执行文件实现WebDriver协议。此可执行文件在系统上启动服务器,而该服务器又负责在Selenium中运行测试脚本。Google Chrome浏览器中自动执行以下测试方案 将系统属性“webdriver.chrome.driver” 设置为 ChromeDriver.exe 文件的路径并实例化Ch...原创 2018-12-17 20:00:20 · 5430 阅读 · 0 评论 -
selenium Element is not clickable at point(1429, 40). Other element would receive the click
[2018-11-19 14:44:52.486][ERROR] || TestNg Run Time : org.openqa.selenium.WebDriverException: unknown error: Element <div class="eview-select-item eview-item-selected" id="searchId_eview-select-...原创 2018-11-19 14:50:45 · 1492 阅读 · 0 评论 -
selenium chromedriver 版本VS chrome版本 GeckoDriver版本VSFirefox版本
https://github.com/bonigarcia/webdrivermanager chromedriver各版本下载地址: http://npm.taobao.org/mirrors/chromedriverchromedriver chrome2.43 69-712.42 68-702.41 ...原创 2018-11-21 15:46:06 · 402 阅读 · 0 评论 -
Selenium IDE涅槃重生
Official Selenium BlogAugust 6, 2018Selenium IDE Is Dead, Long Live Selenium IDE!Filed under: Releases — Tour de Dave @ 6:46 pm UTC In August of 2017 Simon shared the bleak, hard news that as ...翻译 2018-08-31 17:26:29 · 517 阅读 · 0 评论 -
selenium webdriver 深入理解各元素定位方法
概要菜单栏,由于安装不同的组件导致录制的xpath发生变化。左侧树,由于左侧树由于业务会经常发生变动,导致录制xpath发生变化。列表信息,通常一个列表里面包含N多数据,我们不可以挨个去录制。且列表一般都是可配置列的。动态id,很多弹出页面,弹出框之类的页面大多都使用的是动态id 为解决此类问题,我们要学会活用selenium为我们提供的多种定位方式。 用以达到用例稳定...原创 2018-08-28 10:32:28 · 18088 阅读 · 2 评论 -
selenium webdriver 显示等待,隐示等待,元素是否可用
package util;import java.util.concurrent.TimeUnit;import org.apache.log4j.Logger;import org.openqa.selenium.By;import org.openqa.selenium.JavascriptExecutor;import org.openqa.selenium.NoSuchEl...原创 2018-07-28 11:24:04 · 2421 阅读 · 0 评论 -
selenium webdriver 刷新页面
driver.navigate().refresh(); 1.driver.navigate().refresh();2.driver.get(driver.getCurrentUrl());3.driver.navigate().to(driver.getCurrentUrl());4.driver.findElement(By.id("Contact-us")).sendKe...原创 2018-06-15 12:08:31 · 14055 阅读 · 3 评论 -
零基础搭建自动化测试框架--004使用断言(selenium testng 断言)
断言是什么? ? ? ? 一个测试的成功意味着再不抛任何异常的情况下执行完成。断言帮助我们验证测试条件,并根据测试条件确认用例是否执行成功还是执行失败。 下面以验证以验证谷歌标题等于Google为例。如果页面标题和我们提供的目标文本标题不一直, 则跑出异常,用例失败。如下面的代码示例所示:@Test publicvoid testCaseVerifyHomePa...原创 2018-06-15 09:42:09 · 415 阅读 · 0 评论 -
selenium 显示等待实例 org.openqa.selenium.support.ui.FluentWait
原文链接: https://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.support.ui.FluentWaitExample 1Project: easycukes File: SeleniumHelper.java View source code 7 votes ...转载 2018-11-26 09:07:04 · 1372 阅读 · 0 评论 -
selenium webdriver常用命令及演示代码
WebDriver中一些最常用的Selenium命令1. 获取网页获取网页有两种方法:使用Get方法 -driver.get("www.yiibai.com");使用Navigate方法 -driver.navigate().to("https://yiibai.com/selenium/");2. 查找表单并发送用户输入driver.findElement(By.id("...原创 2018-12-15 17:58:56 · 2715 阅读 · 0 评论 -
selenium webdriver 实践演练
自动化演练步骤及代码:将自动执行以下测试操作:调用Firefox浏览器。 打开网址: www.baidu.com 点击百度搜索文本框。 输入关键字 - “易百教程” 单击“搜索”按钮。接下来将逐步创建测试用例,以便详细了解每个组件。第1步 - 启动Eclipse IDE并打开在本教程的上一节(配置Selenium WebDriver)中创建的项目“Demo_Test” 。在“...原创 2018-12-17 19:50:32 · 548 阅读 · 0 评论 -
selenium Webdriver 使用手册
selenium Webdriver 使用手册1 概述1.1 Selenium基本术语1 概述1.1 Selenium基本术语原创 2018-12-11 19:04:33 · 2022 阅读 · 0 评论 -
Selenium IDE介绍
Selenium IDE简介Selenium IDE(集成开发环境)是Selenium Suite下的开源Web自动化测试工具。 与Selenium WebDriver和RC不同,它不需要任何编程逻辑来编写其测试脚本,而只需记录与浏览器的交互以创建测试用例。 之后,可以使用播放选项重新运行测试用例。注意:Selenium IDE仅作为Mozilla Firefox和Chrome插件提供,它...原创 2018-12-11 19:40:12 · 27061 阅读 · 1 评论 -
Selenium IDE第一个测试用例
Selenium IDE中的整个测试脚本创建过程可分为三个步骤:录制(记录用户与浏览器的交互) 播放(执行录制的脚本) 保存测试套件 录制启动Firefox浏览器。 单击浏览器右上角的Selenium图标。它将启动Selenium IDE的默认界面。 记录一个新的测试项目(选择第一项),将测试项目命名为:yiibai-first-testcase ,然后再输入网址,如下...原创 2018-12-11 20:01:58 · 1517 阅读 · 0 评论 -
Selenium WebDriver简介
概述Selenium的最大变化是包含了WebDriver API。使用Selenium服务器本地或在远程计算机上以用户身份本地驱动浏览器,标志着浏览器自动化方面的飞跃。Selenium WebDriver与RC的作用相同,并且包含了原始的1.x绑定。它指的是语言绑定和各个浏览器控制代码的实现。这通常被称为WebDriver 或有时被称为Selenium 2。Selenium 1.0 +...原创 2018-12-11 20:19:46 · 1883 阅读 · 1 评论 -
Selenium WebDriver安装
Selenium WebDriver安装过程分四个基本步骤完成:下载并安装Java 8或更高版本。 下载并配置Eclipse或选择其它Java IDE。 下载Selenium WebDriver Java客户端 配置Selenium WebDriver下载并安装Java假设您已在计算机上安装了Java 8或更高版本,并成功配置了运行和编译java程序所需的环境变量。注意:需要安...原创 2018-12-11 20:57:40 · 8661 阅读 · 1 评论 -
selenium webdriver 使用webDriver点击ENTER建的两种方法
使用webDriver点击ENTER建的两种方法:. First: driver.findElement(By.id("idValue")).sendKeys(Keys.ENTER); Second:Actions action = new Actions(driver);webElement element = driver.findEle...原创 2019-04-19 15:25:36 · 4017 阅读 · 0 评论 -
Selenium Webdriver Actions基本操作
/** *左键点击元素上的具体坐标位置 * @param driver * @param abnormElement 需要点击的元素 * @param x 需要点击的元素上的点的X坐标 * @param y 需要点击的元素上的点的Y坐标 */ public static void mouseClick(WebDriver driver, WebElement abno...原创 2019-07-08 17:06:44 · 4273 阅读 · 0 评论 -
零基础搭建自动化测试框架--002本地工程搭建
1:本地安装eclipse2:eclipse安装testng插件3:eclipse配置maven4:安装Selenium IDE 或者其替换者 Katalon AutomationRecorder 5:创建maven工程6:第一个自动化测试demo一、本地安装eclipse二、eclipse安装testng插件http://marketplace.eclipse.org/marketplace-c...原创 2018-05-21 20:17:47 · 334 阅读 · 0 评论 -
【UI自动化设计模式】超越 Page Objects:使用Serenity和ScreenplayPattern实现新一代的自动化测试
http://www.infoq.com/cn/articles/Beyond-Page-Objects-Test-Automation-Serenity-Screenplay在如今快节奏的软件交付环境下,自动化验收测试是很有必要的。高质量的自动化验收测试能够减少手动测试和bug修复所耗费的时间,从而帮助我们更快地交付有价值的特性。将其与行为驱动开发(Behaviour-Driven Develo...转载 2018-04-27 18:05:10 · 2502 阅读 · 0 评论 -
selenium webdriver 使用testng实现截图功能
import java.io.File;import org.apache.commons.io.FileUtils;import org.openqa.selenium.By;import org.openqa.selenium.OutputType;import org.openqa.selenium.TakesScreenshot;import org.openqa.seleni...原创 2018-03-30 15:54:45 · 1015 阅读 · 0 评论 -
selenium webdriver 获取tooltip消息
http://learn-automation.com/how-to-capture-tooltip-in-selenium-webdriver/https://www.softwaretestingmaterial.com/get-tooltip-text-selenium-webdriver/https://stackoverflow.com/questions/19218404/ho...原创 2018-03-14 17:22:13 · 641 阅读 · 0 评论 -
java使用jxl从excel中写入,读取数据
从Excel中读取数据package com.pack;import java.io.FileInputStream;import java.io.IOException;import jxl.Sheet;import jxl.Workbook;import jxl.read.biff.BiffException;public class ReadExcelFile { pu...原创 2018-03-13 22:17:03 · 718 阅读 · 0 评论 -
selenium webdriver 高亮(highlight)显示元素
public static void highlight(WebDriver diver, WebElement element) { JavascriptExecutor js = (JavascriptExecutor) diver; js.executeScript("element = arguments[0];" + ...原创 2018-03-23 11:10:09 · 1820 阅读 · 0 评论 -
自动化测试相关网站
https://github.com/SeleniumHQ/seleniumhttps://www.c-sharpcorner.com/UploadFile/726c11/page-factory-based-selenium-automation-framework/https://www.programcreek.com/java-api-examples/index.php?api=org....原创 2018-03-12 19:44:38 · 514 阅读 · 0 评论 -
selenium webdrive 处理tooltips文本提示框
原文来自:http://www.seleniumeasy.com/selenium-tutorials/how-to-verify-tooltip-text-with-selenium-webdriver-using-java示例1:以上selenium官网提示消息为例:获取Tips 的定位方式为:(可以使用提示消息在html文件中查找)WebElement element =...原创 2018-03-18 12:37:54 · 1697 阅读 · 0 评论 -
selenium webdriver 根据传入参数选择非select标签类下拉框
/** * 根据下拉框内容选择下拉框数据 * @param element * @param visibleText */ public static void selectByVisibleText(WebElement element,String visibleText) { List<WebElement> elementList = element...原创 2018-03-15 16:59:40 · 3270 阅读 · 0 评论 -
selenium webdriver POM(Page Object Model)自动化测试框架
POM面对象模型架现在已经成为业界非常流行的测试自动化框架,因为它易于维护和减少代码的重复,深的大家青睐。 POM模型的主要优点: 如果对任何页面UI进行更改,不需要我们改变任何测试用例,我们只需要更改页面对象中的代码(只在一个地方)。使用selenium的许多其他工具都遵循页面对象模型。 POM模型要求将一个页面上所有功能/可重用组件写到一个class文件中。现在说...原创 2018-03-08 21:42:06 · 4189 阅读 · 0 评论 -
selenium webdriver 使用PhantomJSDriver爬取简单网页链接
public void openCsdnLink() { String threadName = Thread.currentThread().getName(); WebDriver driver = CommonUtil.openPhantomJS(); driver.navigate().to("https://blog.youkuaiyun.com/xiaoguany...原创 2018-04-07 17:03:20 · 4220 阅读 · 0 评论 -
selenium webdriver 处理Windows弹出窗口(window handles)
步骤1:打开网站后,通过getwindowhandle()程序得到主窗口的句柄。步骤2:使用getwindowhandles()方法获取所有窗口句柄步骤3:我们将将所有窗口句柄与主窗口句柄进行比较,并执行我们需要的窗口操作。 package com.pack;import java.util.Set;import org.openqa.selenium.W...原创 2018-03-27 14:14:26 · 11091 阅读 · 0 评论 -
【翻译】创建UI测试自动化框架的15个最佳实践
原文连接:https://dzone.com/articles/top-15-ui-test-automation-best-practices-you-shoul-1创建UI测试自动化框架的前15个最佳实践:1. 不要只依赖于UI自动化测试2. 考虑使用BDD框架。3. 切记一定要使用测试设计模式和原则。4. 千万不要使用Thread.sleep(),除非有特定的...原创 2018-04-26 20:56:35 · 1957 阅读 · 0 评论 -
零基础搭建自动化测试框架--001工具选型
主体框架:Selenium webdriver 测试执行:Testng持续集成:Jenkins代码仓库:github开发语言:java工程类型:maven原创 2018-05-10 17:07:33 · 638 阅读 · 0 评论 -
selenium webdriver 解决IP输入框使用sendkey输入不进去ip地址的问题
selenium webdriver 解决类似IP输入框使用sendkey输入不进去ip地址的问题解决方案:((JavascriptExecutor)driver).executeScript("arguments[0].value='"+startIP+"'", element); ...原创 2018-04-25 10:28:09 · 1697 阅读 · 0 评论 -
selenium webdriver XPath 多条件查询语句(处理同一个页面上出现相同文本按钮的动态ID元素定位)
<div id="MessageDialog_2_0" tabindex="1" data-type="primary" class="eview-widget-button" id_ignore="true" name_ignore="true" class_ignore="true">确定</div>原创 2018-03-29 15:51:05 · 7601 阅读 · 0 评论 -
selenium webdriver 运行JS报错: WebDriverException: unknown error: Maximum call stack size exceeded
执行js.executeScript() 时抛出异常org.openqa.selenium.WebDriverException: unknown error: Maximum call stack size exceeded 原因,返回的Object 数据太大。 尽量取子层数据。 以下回答来自:https://stackoverflow.com/questions/2...原创 2018-03-29 11:54:02 · 870 阅读 · 0 评论 -
selenium.JavascriptExecutor.executeScript() 使用实例
Example 1Project: syndesis-qe File: CommonSteps.java View Source Code Vote up 6 votes/** * Scroll the webpage. * * @param topBottom possible values: top, bottom * @param leftRight poss...转载 2018-03-29 09:28:05 · 20588 阅读 · 0 评论 -
selenium webdriver使用SELECT方法操作下拉菜单
方法名称:selectbyindex语法:select.selectbyindex(index);目的:根据用户给出的索引选择选项。条件:html中的“value”的属性,具有索引值。例如:<html><head><title>Select Example by Index value</title></head>...原创 2018-04-04 09:43:14 · 7246 阅读 · 0 评论 -
selenium webdriver 处理iframe方法汇总
---------------------------------------| | || | || Frame 1 | || | ...原创 2018-03-27 15:22:13 · 2124 阅读 · 0 评论