Start Hub and Node with Json config

1. Start Hub with json config file

  1. title HubWebDriver
  2. java -jar selenium-server-standalone-2.29.0.jar
  3. -role hub
  4. -hubConfig hubconfig.json
  5. pause

hubconfig.json

  1. {
  2. "host": null,
  3. "port": 4444,
  4. "newSessionWaitTimeout": 300000,
  5. "servlets" : [],
  6. "prioritizer": null,
  7. "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  8. "throwOnCapabilityNotPresent": true,
  9. "nodePolling": 5000,
  10. "cleanUpCycle": 5000,
  11. "nodeTimeout": 360000,
  12. "timeout": 480000,
  13. "browserTimeout": 0,
  14. "maxSession": 5
  15. }

2. Start Node with json file

  1. title NodeWebDriver
  2. java -jar selenium-server-standalone-2.<last_version>.jar
  3. -Dwebdriver.ie.driver="ABSOLUTE_PATH\IEDriverServer.exe"
  4. -Dwebdriver.chrome.driver="ABSOLUTE_PATH\chromedriver.exe"
  5. -Dwebdriver.safari.bin="ABSOLUTE_PATH\Safari.exe"
  6. -Dwebdriver.opera.bin="ABSOLUTE_PATH\opera.exe"
  7. -Dwebdriver.chrome.bin="ABSOLUTE_PATH\chrome.exe"
  8. -Dwebdriver.ie.bin="ABSOLUTE_PATH\iexplore.exe"
  9. -role node
  10. -nodeConfig nodeconfig.json
  11. pause

nodeconfig.json

  1. {
  2. "capabilities":
  3. [
  4. {
  5. "seleniumProtocol": "Selenium",
  6. "platform": "MAC",
  7. "browserName": "*iexplore",
  8. "maxInstances": "1"
  9. },
  10. {
  11. "seleniumProtocol": "Selenium",
  12. "platform": "MAC",
  13. "browserName": "*firefox",
  14. "maxInstances": "5",
  15. "firefox_binary":"c:\sss\firefox.exe"
  16. },
  17. {
  18. "seleniumProtocol":"Selenium",
  19. "browserName":"*firefox",
  20. "maxInstances":1
  21. },
  22. {
  23. "seleniumProtocol":"WebDriver",
  24. "browserName":"firefox",
  25. "maxInstances":1,
  26. "firefox_binary":"c:\sss\firefox.exe"
  27. },
  28. {
  29. "seleniumProtocol":"WebDriver",
  30. "browserName":"internet explorer",
  31. "maxInstances":1
  32. },
  33. {
  34. "seleniumProtocol":"WebDriver",
  35. "browserName":"chrome",
  36. "maxInstances":1
  37. "chrome_binary":"c:\sss\chrome.exe"
  38. },
  39. {
  40. "seleniumProtocol":"WebDriver",
  41. "browserName":"opera",
  42. "maxInstances":1
  43. },
  44. {
  45. "seleniumProtocol":"WebDriver",
  46. "browserName":"safari",
  47. "maxInstances":1
  48. }
  49. ],
  50. "configuration":
  51. {
  52. "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  53. "maxSession": 5,
  54. "port": 5531,
  55. "hubHost": "IP Address of the Hub",
  56. "register": true,
  57. "registerCycle": 5000,
  58. "hubPort": 4444
  59. }
  60. }

How to view hub status?

http://192.168.9.106:5531/wd/hub/static/resource/hub.html

How to view node status?

http://192.168.9.63:4444/grid/console

Selenium Grid Configuration的更多相关文章

  1. Webdriver - Selenium Grid Configuration

    Grid parameter: role = <hub|node> (default is no grid, just run an RC/webdriver server). When ...

  2. Selenium Grid 运行报错 Exception thrown in Navigator.Start first time ->Error forwarding the new session Empty pool of VM for setup Capabilities

    Selenium Grid 运行报错 : Exception thrown in Navigator.Start first time ->Error forwarding the new se ...

  3. selenium grid的使用与配置

    一.selenium grid的组成与作用:由一个集线器hub和多个客户机node组成,如果你的程序需要在不用的浏览器,不同的操作系统上测试,而且比较多的case需要多线程远程执行,那么一个比较好的测 ...

  4. Selenium 15: How to Run Parallel Tests Using Selenium Grid and JUnit

    In this post, I will give two techniques and describe how to run your selenium tests in parallel by ...

  5. [Selenium] Grid 介绍

    Selenium Grid 支持分布式测试,使测试人员可在分布式环境中进行测试 一般而言,在面临以下情况时可考虑使用Selenium Grid : 1.测试多个浏览器或单个浏览器多个版本,或测试不同操 ...

  6. 搭建selenium grid简单配置

    1.使用selenium提供的服务端独立jar包 :服务端.客户端都是运行于java7环境. 2.启动hub: hub配置文件如下: Java -jar selenium-server-standal ...

  7. Robot Framework + Selenium2Library环境下,结合Selenium Grid实施分布式自动化测试

    最近一段时间,公司在推行自动化测试流程,本人有幸参与了自定义通用控件的关键字封装和脚本辅助编写.数据驱动管理.测试用例执行管理等一系列工具软件的研发工作,积累了一些经验,在此与大家做一下分享,也算是做 ...

  8. Selenium Grid 学习笔记

    Selenium Grid 学习笔记http://www.docin.com/p-765680298.html

  9. selenium Grid(一)

    selenium grid Quick Start selenium-grid是用于设计帮助我们进行分布式测试的工具,其整个结构是由一个hub节点和若干个代理节点组成.hub用来管理各个代理节点的注册 ...

随机推荐

  1. 中型企业的IT运维策略

    如何建设一支能够解决问题.创造价值.有活力的.不断进取的IT运维团队,并带领这支团队?充分发挥这个团队的优势力量,是运维业务有效开展的关 键.运维策略是直接体现运维业务的经济价值所在.好的运维措施.方 ...

  2. 完成Adventure中的主方法

    package a; public interface CanSwim { void swim(); } package a; public interface CanFly { void fly() ...

  3. 【leetcode❤python】110. Balanced Binary Tree

    #-*- coding: UTF-8 -*-#平衡二叉树# Definition for a binary tree node.# class TreeNode(object):#     def _ ...

  4. Create Hierarchical Tree To Control Records In Oracle Forms

    Download Source Code Providing an example form for creating hierarchical trees in Oracle Forms to co ...

  5. Java float保留两位小数或多位小数

    Java float保留两位小数或多位小数 方法1:用Math.round计算,这里返回的数字格式的.    float price=89.89;int itemNum=3;float totalPr ...

  6. JAVA排序--[冒泡排序]

    package com.array; public class Sort_MaoPao { /** * 项目名称:冒泡排序 * 项目要求:用JAVA对数组进行排序,并运用冒泡排序算法 * 作者:Sev ...

  7. SQL索引一步到位

    以下均非原创,仅供分享.学习!!! SQL索引在数据库优化中占有一个非常大的比例, 一个好的索引的设计,可以让你的效率提高几十甚至几百倍,在这里将带你一步步揭开他的神秘面纱. 1.1 什么是索引? S ...

  8. POJ 3253 Fence Repair(修篱笆)

    POJ 3253 Fence Repair(修篱笆) Time Limit: 2000MS   Memory Limit: 65536K [Description] [题目描述] Farmer Joh ...

  9. How to build a GUI in ROS with Qt / C++

    p { margin-bottom: 0.1in; direction: ltr; line-height: 120%; text-align: left; widows: 2; orphans: 2 ...

  10. python_way ,day23 API

    python_way ,day23 1.api认证  .api加密动态请求 2.自定义session 一.api认证 首先提供api的公司,如支付宝,微信,都会给你一个用户id,然后还会让你下一个SD ...