参考链接:http://code.google.com/p/selenium/wiki/Grid2

本地环境为:win7,eclipse,jdk 1.7,本机ip为192.168.0.30

1.下载所需文件

1.1 下载好jar包,下载网址为:http://selenium.googlecode.com/files/selenium-server-standalone-2.37.0.jar 目前2.37为最新版本,或者直接点击官网 http://docs.seleniumhq.org/download/

Selenium Server (formerly the Selenium RC Server)

The Selenium Server is needed in order to run either Selenium RC style scripts or Remote Selenium Webdriver ones. The 2.x server is a drop-in replacement for the old Selenium RC server and is designed to be backwards compatible with your existing infrastructure.

Download version 2.37.0

To use the Selenium Server in a Grid configuration see the wiki page.

点击2.37.0超链接即可下载。

1.2下载好IEDriverServer.exe,打开IE的驱动程序,这里选择32位的哦,64位的有bug.(系统是64位的用32位驱动也能启动IE)

The Internet Explorer Driver Server

This is required if you want to make use of the latest and greatest features of the WebDriver InternetExplorerDriver. Please make sure that this is available on your $PATH (or %PATH% on Windows) in order for the IE Driver to work as expected.

Download version 2.37.0 for (recommended) 32 bit Windows IE or 64 bit Windows IE
CHANGELOG

点击 32 bit Windows IE,即可下载,或者直接点击http://code.google.com/p/selenium/downloads/detail?name=IEDriverServer_Win32_2.37.0.zip 下载

2.把下载好的jar包随便放到一个目录下,编辑一个txt文件,然后把下面的代码改下,保存为.bat文件,双击之后即打开了selenium rc 的4444端口,程序即是从此调用开始的。

打开firefox端口脚本如下:

java -jar  D:\developsoft\Selenium_Test\selenium-server-standalone-2.35.0.jar -browser “browserName=firefox,version=25.0,firefox_binary=C:\Program Files\Mozilla Firefox\firefox.exe,maxInstances=5, platform=WINDOWS”

 打开IE端口脚本如下:

java -Dwebdriver.ie.driver=D:\developsoft\Selenium_Test\IEDriverServer.exe -jar D:\developsoft\Selenium_Test\selenium-server-standalone-2.35.0.jar -mode hub

  

3.java程序配置连接设置情况:

firefox程序配置如下:

           DesiredCapabilities ffCapabilities = DesiredCapabilities.firefox();
webDriver = new RemoteWebDriver(new URL("http://192.168.0.30:4444/wd/hub"), ffCapabilities);//在另一台电脑上打开本机即可。

  ie程序配置如下:

     DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer(); //internetExplorer
ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
webDriver = new RemoteWebDriver(new URL("http://192.168.0.30:4444/wd/hub"), DesiredCapabilities.internetExplorer());

  

4.可以开始写测试脚本程序了

这里只是讲环境搭建,就不举实例了,如有问题欢迎留言。

【总结】selenium webdriver 远程连接firefox和IE 环境搭建的更多相关文章

  1. Selenium & Webdriver 远程测试和多线程并发测试

    Selenium & Webdriver 远程测试和多线程并发测试 Selenium Webdriver自动化测试,初学者可以使用selenium ide录制脚本,然后生成java程序导入ec ...

  2. Selenium win7+selenium2.0+python+JetBrains PyCharm环境搭建

    win7+selenium2.0+python+JetBrains PyCharm环境搭建 by:授客 QQ:1033553122 步骤1:下载python 担心最新版的支持不太好,这里我下载的是py ...

  3. 总结Selenium自动化测试方法(二)测试环境搭建

    (接上期内容) 二.测试环境搭建 1.安装python 现在python3.0比python2.0多了一些改进的功能(详见http://zhidao.baidu.com/link?url=3sT1g7 ...

  4. 【控制连接实现信息共享---linux和设备下ssh和远程连接telnet服务的简单搭建】

    SSH的配置 空密码登陆ssh server 如果要登录ssh server通常要在server和client之间采取具有共同加密的秘钥,若每次当client想要了:连接ssh server时都要手工 ...

  5. MFC ADO连接Oracle12c数据库 客户端环境搭建

    ADO连接方式一:Provider=MSDAORA.1; 环境配置如下: 去官网下载ODAC121024Xcopy_32bit.zip安装 安装方式如下: (1)解压文件 (2)用命令行CD到该文件的 ...

  6. [z]Windows 下基于 Eclipse 的可视化远程 Linux C/C++ 开发环境搭建

    http://blog.csdn.net/lostaway/article/details/8086056 1.简介 Windows 下远程 Linux 开发工具,比较著名的就是 WinGDB 和 M ...

  7. Python+Selenium - Web自动化测试(一):环境搭建

    清单列表: Python 3x Selenium Chrome Pycharm 一.Python的安装: Python官网下载地址:https://www.python.org/ 1.  进入官网地址 ...

  8. win7 eclipse连接hadoop2.x开发环境搭建

    环境: hadoop-2.3.0-cdh5.1.0 centos 6.5 x64 win7 eclipse4.3 0. 前提条件 ,jdk,maven要安装好. 1.下载hadoop,用winRAR解 ...

  9. 【selenium+python】之Python Flask 开发环境搭建(Windows)

    一.先安装python以及pip 二.其次, Python的虚拟环境安装: 在github上下载https://github.com/pypa/virtualenv/tree/master  zip文 ...

随机推荐

  1. a,b盘去哪儿?

    我们知道,电脑的硬盘从c盘开始了,那我们不仅要问了,a,b盘符去哪儿了? 打开Windows系统的电脑,看到的第一个硬盘分区是C盘,请问A盘和B盘在哪里?所谓的硬盘分区号就是盘符,也就是驱动器号,是微 ...

  2. MFC如何制作字体选择对话框

    MFC封装类:CFontDialog 核心代码如下: void CGraphicView::OnFont() { CFontDialog dlg; if( IDOK == dlg.DoModal() ...

  3. Android -- Toolbar跟随ListView滑动隐藏和显现

    布局 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:too ...

  4. Magento错误 Illegal scheme supplied, only alphanumeric characters are permitted

    1.检查表core_config_data 'web/unsecure/base_url' 和'web/secure/base_url' 的值是否是正确的链接地址 2.删除系统目录var下所有子目录及 ...

  5. Window配置Redis环境和简单使用

    一.关于Redis Redis是一个开源(BSD许可),内存存储的数据结构服务器,可用作数据库,高速缓存和消息队列代理.它支持字符串.哈希表.列表.集合.有序集合,位图,hyperloglogs等数据 ...

  6. Solidworks直接打开SWB文件报错怎么办

       

  7. 解决工作中遇到的一个"打开,保存"文件框的bug的过程

    工作中遇到的这个问题还是很有意思的.其中嵌套了很多奇葩性的问题. (转载请指明出于breaksoftware的csdn博客) 我们来看下故事的发生过程,QA同学发现我们存在如下的bug 看到如此多的串 ...

  8. uni-app - 上传图片组件

    2018-12-29 更新1.0  2019-01-08 更新1.1 2019-01-29 更新1.3   重大更新 插件地址: http://ext.dcloud.net.cn/plugin?id= ...

  9. vcenter SSO

  10. 简单的WebRTC例子

    webrtc网上封装的很多,demo很多都是一个页面里实现的,今天实现了个完整的 , A 发视频给 B. A offer.html作为offer <!DOCTYPE html> <h ...