上一篇已经搭建好了Eclipse+selenium2的环境,这一篇主要记录下TestNG的使用. 一.在Eclipse中安装TestNG 1.打开eclipse-->help-->Install New Software-->Add,输入Name和Location后,点击OK. TestNG官方下载地址:http://testng.org/doc/download.html 2.然后选中TestNG,单击Next安装 3.安装好TestNG后重启eclipse查看是否安装好,Help--…
一.在Eclipse中安装TestNG 1.打开eclipse-->help-->Install New Software-->Add,输入Name和Location后,点击OK. TestNG官方下载地址:http://testng.org/doc/download.html 2.然后选中TestNG,单击Next安装 3.安装好TestNG后重启eclipse查看是否安装好,Help-->About Eclipse-->Installation Details,如图: 二…
webdriver入门-Java   如何用webdriver打开一个浏览器,我们常用的浏览器有firefox和IE两种,firefox是selenium支持得比较成熟的浏览器,很多新的特性都会在firefox中体现.但是做页面的测试,启动速度比较慢,启动以后运行速度还是可以接受的. 启动firefox浏览器 新建一个firefoxDriver如果火狐浏览器没有默认安装在C盘,需要制定其路径 System.setProperty("webdriver.firefox.bin", &qu…
selenium2 Webdriver + Java 自动化测试实战和完全教程一.快速开始 博客分类: Selenium-webdriverselenium webdriver 学习selenium webdriver 学习历程(一)------------快速开始学习 selenium 已经两年了,从 1.X 到 2.X,一直在关注它.中间由于工作原因中断了一段时间,但是一直无法割舍,最近又去官网看了一下,更新还挺快的.selenium1.X 的时代将被取代,selenium-webdriv…
selenium2 WebDriver是一款跨平台的 自动化测试工具,它可以操纵浏览器,模拟用户行为,非常方便用户进行自动化测试. .net项目使用它,首先要通过 Visual Studio 的 nugit 包管理器在项目中安装 Selenium WebDirver 它提供了 火狐.chrome.IE.HtmlUnit 浏览器的驱动,用来操作浏览器. 注意,启动浏览器需要相应的dirver ,放到测试程序运行目录里.火狐浏览器dirver  下载地址  https://github.com/mo…
In this post, we will see how does one make use of TestNG to kick off parallel UI tests using WebDriver. So lets try doing this with a typical cooking recipe style :) So here are the ingredients that are required. A Factory class that will create Web…
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…
python selenium webdriver入门基本操作 未经作者允许,禁止转载! from selenium import webdriver import time driver=webdriver.Chrome() driver.get('http://www.baidu.com')#进入百度首页 driver.maximize_window()#窗口最大化 time.sleep(1) driver.set_window_size(480,600)#窗口大小变化 time.sleep…
本文是对上一节的补充:http://www.cnblogs.com/puresoul/p/4251536.html 使用Selenium2(webdriver)启动firefox且自动加载firebug插件时,切换到firebug插件的网络和cookies部分时,提示面板已被禁用,如下图所示: 于是我们输入about:config在firefox设置页面试着去找下是否有什么参数控制着面板的禁用/启用,果然被我找到如下两个参数: cookies面板 ---  extensions.firebug.…
本文主要记录下在使用selenium2/webdriver时启动各种浏览器的方法.以及如何加载插件.定制浏览器信息(设置profile)等 环境搭建可参考我的另一篇文章:http://www.cnblogs.com/puresoul/p/3483055.html 一.Driver下载地址: http://docs.seleniumhq.org/download/ 二.启动firefox浏览器(不需要下载驱动,原生支持) 1.firefox安装在默认路径下: //启动默认安装路径下的ff publ…