当前位置: 首页 > 面试题库 >

Selenium Grid Hub / Node Config的属性

纪枫
2023-03-14
问题内容

我正在经历将我的Selenium Hub /
Node升级到版本3.3的过程。一切正常,但我想确保自己具有最佳配置…问题是我在任何地方都找不到集线器/节点属性的完整列表。

我浏览了:

  • https://seleniumhq.github.io/docs/grid.html
  • http://www.seleniumhq.org/docs/07_selenium_grid.jsp
  • https://github.com/SeleniumHQ/selenium/wiki/Grid2
  • https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa/grid/common/defaults/DefaultNodeWebDriver.json
  • https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa/grid/common/defaults/DefaultHub.json

这些文档仅通过示例配置列出了一些属性,但是它们似乎都不是完整列表,更重要的是,它们都没有实际说明这些属性的作用。 Selenium Hub /
Nodes的配置属性的完整列表的文档在哪里?


问题答案:

该文档可通过Selenium独立uber jar本身获得。

java -jar selenium-server-standalone-3.3.1.jar -help

Usage: <main class> [options]
  Options:
    --version, -version
       Displays the version and exits.
       Default: false
    -browserTimeout
       <Integer> in seconds : number of seconds a browser session is allowed to
       hang while a WebDriver command is running (example: driver.get(url)). If the
       timeout is reached while a WebDriver command is still processing, the session
       will quit. Minimum value is 60. An unspecified, zero, or negative value means
       wait indefinitely.
       Default: 0
    -debug
       <Boolean> : enables LogLevel.FINE.
       Default: false
    -jettyThreads, -jettyMaxThreads
       <Integer> : max number of threads for Jetty. An unspecified, zero, or
       negative value means the Jetty default value (200) will be used.
    -log
       <String> filename : the filename to use for logging. If omitted, will log
       to STDOUT
    -port
       <Integer> : the port number the server will use.
       Default: 4444
    -role
       <String> options are [hub], [node], or [standalone].
       Default: standalone
    -timeout, -sessionTimeout
       <Integer> in seconds : Specifies the timeout before the server
       automatically kills a session that hasn't had any activity in the last X seconds. The
       test slot will then be released for another test to use. This is typically
       used to take care of client crashes. For grid hub/node roles, cleanUpCycle
       must also be set.
       Default: 1800

对于hub角色的帮助

java -jar selenium-server-standalone-3.3.1.jar -role hub -help

Usage: <main class> [options]
  Options:
    --version, -version
       Displays the version and exits.
       Default: false
    -browserTimeout
       <Integer> in seconds : number of seconds a browser session is allowed to
       hang while a WebDriver command is running (example: driver.get(url)). If the
       timeout is reached while a WebDriver command is still processing, the session
       will quit. Minimum value is 60. An unspecified, zero, or negative value means
       wait indefinitely.
       Default: 0
    -matcher, -capabilityMatcher
       <String> class name : a class implementing the CapabilityMatcher
       interface. Specifies the logic the hub will follow to define whether a request can
       be assigned to a node. For example, if you want to have the matching process
       use regular expressions instead of exact match when specifying browser
       version. ALL nodes of a grid ecosystem would then use the same capabilityMatcher,
       as defined here.
       Default: org.openqa.grid.internal.utils.DefaultCapabilityMatcher@64a294a6
    -cleanUpCycle
       <Integer> in ms : specifies how often the hub will poll running proxies
       for timed-out (i.e. hung) threads. Must also specify "timeout" option
       Default: 5000
    -custom
       <String> : comma separated key=value pairs for custom grid extensions.
       NOT RECOMMENDED -- may be deprecated in a future revision. Example: -custom
       myParamA=Value1,myParamB=Value2
       Default: {}
    -debug
       <Boolean> : enables LogLevel.FINE.
       Default: false
    -host
       <String> IP or hostname : usually determined automatically. Most commonly
       useful in exotic network configurations (e.g. network with VPN)
    -hubConfig
       <String> filename: a JSON file (following grid2 format), which defines
       the hub properties
    -jettyThreads, -jettyMaxThreads
       <Integer> : max number of threads for Jetty. An unspecified, zero, or
       negative value means the Jetty default value (200) will be used.
    -log
       <String> filename : the filename to use for logging. If omitted, will log
       to STDOUT
    -maxSession
       <Integer> max number of tests that can run at the same time on the node,
       irrespective of the browser used
    -newSessionWaitTimeout
       <Integer> in ms : The time after which a new test waiting for a node to
       become available will time out. When that happens, the test will throw an
       exception before attempting to start a browser. An unspecified, zero, or negative
       value means wait indefinitely.
       Default: -1
    -port
       <Integer> : the port number the server will use.
       Default: 4444
    -prioritizer
       <String> class name : a class implementing the Prioritizer interface.
       Specify a custom Prioritizer if you want to sort the order in which new session
       requests are processed when there is a queue. Default to null ( no priority = FIFO
       )
    -role
       <String> options are [hub], [node], or [standalone].
       Default: hub
    -servlet, -servlets
       <String> : list of extra servlets the grid (hub or node) will make
       available. Specify multiple on the command line: -servlet tld.company.ServletA
       -servlet tld.company.ServletB. The servlet must exist in the path:
       /grid/admin/ServletA /grid/admin/ServletB
       Default: []
    -timeout, -sessionTimeout
       <Integer> in seconds : Specifies the timeout before the server
       automatically kills a session that hasn't had any activity in the last X seconds. The
       test slot will then be released for another test to use. This is typically
       used to take care of client crashes. For grid hub/node roles, cleanUpCycle
       must also be set.
       Default: 1800
    -throwOnCapabilityNotPresent
       <Boolean> true or false : If true, the hub will reject all test requests
       if no compatible proxy is currently registered. If set to false, the request
       will queue until a node supporting the capability is registered with the grid.
       Default: true
    -withoutServlet, -withoutServlets
       <String> : list of default (hub or node) servlets to disable. Advanced
       use cases only. Not all default servlets can be disabled. Specify multiple on
       the command line: -withoutServlet tld.company.ServletA -withoutServlet
       tld.company.ServletB
       Default: []

对于node角色的帮助

java -jar selenium-server-standalone-3.3.1.jar -role node -help

Usage: <main class> [options]
  Options:
    --version, -version
       Displays the version and exits.
       Default: false
    -browserTimeout
       <Integer> in seconds : number of seconds a browser session is allowed to
       hang while a WebDriver command is running (example: driver.get(url)). If the
       timeout is reached while a WebDriver command is still processing, the session
       will quit. Minimum value is 60. An unspecified, zero, or negative value means
       wait indefinitely.
       Default: 0
    -capabilities, -browser
       <String> : comma separated Capability values. Example: -capabilities
       browserName=firefox,platform=linux -capabilities browserName=chrome,platform=linux
       Default: [Capabilities [{seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=internet explorer, maxInstances=1}]]
    -cleanUpCycle
       <Integer> in ms : specifies how often the hub will poll running proxies
       for timed-out (i.e. hung) threads. Must also specify "timeout" option
    -custom
       <String> : comma separated key=value pairs for custom grid extensions.
       NOT RECOMMENDED -- may be deprecated in a future revision. Example: -custom
       myParamA=Value1,myParamB=Value2
       Default: {}
    -debug
       <Boolean> : enables LogLevel.FINE.
       Default: false
    -downPollingLimit
       <Integer> : node is marked as "down" if the node hasn't responded after
       the number of checks specified in [downPollingLimit].
       Default: 2
    -host
       <String> IP or hostname : usually determined automatically. Most commonly
       useful in exotic network configurations (e.g. network with VPN)
    -hub
       <String> : the url that will be used to post the registration request.
       This option takes precedence over -hubHost and -hubPort options.
       Default: http://localhost:4444
    -hubHost
       <String> IP or hostname : the host address of the hub we're attempting to
       register with. If -hub is specified the -hubHost is determined from it.
    -hubPort
       <Integer> : the port of the hub we're attempting to register with. If
       -hub is specified the -hubPort is determined from it.
    -id
       <String> : optional unique identifier for the node. Defaults to the url
       of the remoteHost, when not specified.
    -jettyThreads, -jettyMaxThreads
       <Integer> : max number of threads for Jetty. An unspecified, zero, or
       negative value means the Jetty default value (200) will be used.
    -log
       <String> filename : the filename to use for logging. If omitted, will log
       to STDOUT
    -maxSession
       <Integer> max number of tests that can run at the same time on the node,
       irrespective of the browser used
       Default: 5
    -nodeConfig
       <String> filename : JSON configuration file for the node. Overrides
       default values
    -nodePolling
       <Integer> in ms : specifies how often the hub will poll to see if the
       node is still responding.
       Default: 5000
    -nodeStatusCheckTimeout
       <Integer> in ms : connection/socket timeout, used for node "nodePolling"
       check.
       Default: 5000
    -port
       <Integer> : the port number the server will use.
       Default: 5555
    -proxy
       <String> : the class used to represent the node proxy. Default is
       [org.openqa.grid.selenium.proxy.DefaultRemoteProxy].
       Default: org.openqa.grid.selenium.proxy.DefaultRemoteProxy
    -register
       if specified, node will attempt to re-register itself automatically with
       its known grid hub if the hub becomes unavailable.
       Default: true
    -registerCycle
       <Integer> in ms : specifies how often the node will try to register
       itself again. Allows administrator to restart the hub without restarting (or
       risk orphaning) registered nodes. Must be specified with the "-register"
       option.
       Default: 5000
    -role
       <String> options are [hub], [node], or [standalone].
       Default: node
    -servlet, -servlets
       <String> : list of extra servlets the grid (hub or node) will make
       available. Specify multiple on the command line: -servlet tld.company.ServletA
       -servlet tld.company.ServletB. The servlet must exist in the path:
       /grid/admin/ServletA /grid/admin/ServletB
       Default: []
    -timeout, -sessionTimeout
       <Integer> in seconds : Specifies the timeout before the server
       automatically kills a session that hasn't had any activity in the last X seconds. The
       test slot will then be released for another test to use. This is typically
       used to take care of client crashes. For grid hub/node roles, cleanUpCycle
       must also be set.
       Default: 1800
    -unregisterIfStillDownAfter
       <Integer> in ms : if the node remains down for more than
       [unregisterIfStillDownAfter] ms, it will stop attempting to re-register from the hub.
       Default: 60000
    -withoutServlet, -withoutServlets
       <String> : list of default (hub or node) servlets to disable. Advanced
       use cases only. Not all default servlets can be disabled. Specify multiple on
       the command line: -withoutServlet tld.company.ServletA -withoutServlet
       tld.company.ServletB
       Default: []


 类似资料:
  • 问题内容: 因为这是有关设计的问题,所以我将先说一下我拥有和想要的东西。 我有 一个使用合成的设计。一个对象包含和一个对象(此示例中为定制对象)。这2个中的每个都有定义它们的自己的数据。这是代码示例: 我也有一个需要代表许多单元格的GUI,我已经写了如何做(如何使用颜色,大小等在屏幕上创建我想要的东西)。它包括诸如CellRepresentation,ShapeRepresentation和Bac

  • 本文向大家介绍图的属性,包括了图的属性的使用技巧和注意事项,需要的朋友参考一下 图具有各种特性,取决于图的结构,这些特性可用于图的表征。这些属性是在与图论领域相关的特定术语中定义的。在本章中,我们将讨论所有图形中共有的一些基本属性。 连通图的半径 来自所有顶点的最小偏心率被视为图G的半径。将顶点到所有其他顶点之间的所有最大距离中的最小值视为图G的半径。 表示法-r(G) 从图中一个顶点的所有偏心率

  • 问题内容: 我已经看到过这种表示法使用了很多东西,我想知道,这两种表示法之间有什么显着区别吗? 和 我一直都在使用,因为我觉得它看上去更干净,但是我不太确定浏览器的解释是否不同于。 有谁知道哪个更好或更正确? 问题答案: 当单位为时,虽然单位是可选的,但我倾向于将其保留,因为然后我可以使用Chrome的开发者工具通过点击值并按向上/向下箭头键来调整值。没有单位,这实际上是不可能的。 此外,CSS缩

  • 问题内容: 我为该标题表示歉意。我找不到更好的方法来解释这种情况。 我使用URL http://www.exampledepot.com/egs/java.util/Props.html中所述的Property类加载属性文件。 我的问题是我可以在该属性文件中使用属性吗? 例: test.properties 其他语法有可能吗? 谢谢 问题答案: 以前从未见过。您当然 可以 制作自己的预处理器。只要

  • 和标题差不多。我在请求正文中有一个可选对象。但是,如果给定了该对象,则它必须包含几个子属性。 我的OpenAPI组件配置如下所示: 我正在使用express openapi validator来验证这一点。现在,我不明白这是否是express openapi validator包的问题,但可选字段(partner)的必填字段(名称、电话)从未验证过。我可以只提供合作伙伴:{},然后直接插入,或者甚

  • Hibernate的property元素具有update、insert属性,根据文档,它声明-http://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/mapping.html#mapping-声明属性 update,insert(可选-默认为true):指定映射列应包含在SQL update和/或insert语句中。将两者都设置为f

  • 在OWL中,不可伸缩属性的子属性也是不可伸缩的吗?同样,非对称属性的子属性也是非对称的吗? 从逻辑上讲,它们应该是这样的,但我在OWL文档中找不到任何说明这种情况的内容。 考虑以下示例: 基于此本体,不允许出现以下情况,因为的父项是不可伸缩的: 但是是否也隐含地不反射性呢?换句话说,这是否也被禁止: 如果你认为一个属性是一组连接成对的点的箭头,那么不可反身仅仅意味着没有在同一个点开始和结束的箭头。

  • 主要内容:什么是文件?,文件的属性什么是文件? 文件可以定义为一个存储记录序列的数据结构。 文件存储在文件系统中,该文件系统可能存在于磁盘或主存储器中。 文件可以是简单的(纯文本)或复杂的(特殊格式)。 文件的集合被称为目录。 在不同级别的目录集合被称为文件系统。 文件的属性 常见的文件属性如下所示 编号 属性 描述 1 名称 每个文件都包含文件在文件系统中被识别的名称。 同一目录中不能有两个同名的文件。 2 标识符 每个文件都有