• TestingDocs
TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Selenium Grid

Selenium Grid Node JSON Configuration

Overview

In this tutorial, we will learn how to register a Selenium Grid Node with custom configuration. We can customize the Node using JSON configuration file. In the earlier post, we have learnt how to start Selenium Grid Hub with a JSON configuration file.

Grid Hub Configuration file

https://www.testingdocs.com/selenium-grid-hub-json-configuration/

Selenium Grid Node configuration file

Create a JSON file with node configuration. For example, create a file name called node.json Define the node configuration file in JSON format. We can register the node with the json configuration file. A sample node configuration file is shown below:

 

{
 "capabilities":
 [
 {
 "browserName": "firefox",
 "marionette": true,
 "maxInstances": 9,
 "seleniumProtocol": "WebDriver"
 },
 {
 "browserName": "chrome",
 "maxInstances": 9,
 "seleniumProtocol": "WebDriver"
 },
 {
 "browserName": "internet explorer",
 "platform": "WINDOWS",
 "maxInstances": 10,
 "seleniumProtocol": "WebDriver"
 },
 {
 "browserName": "safari",
 "technologyPreview": false,
 "platform": "MAC",
 "maxInstances": 1,
 "seleniumProtocol": "WebDriver"
 }
 ],
 "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
 "maxSession": 30,
 "port": -1,
 "register": true,
 "registerCycle": 5000,
 "hub": "http://localhost:4444",
 "nodeStatusCheckTimeout": 5000,
 "nodePolling": 5000,
 "role": "node",
 "unregisterIfStillDownAfter": 60000,
 "downPollingLimit": 2,
 "debug": true,
 "servlets" : [],
 "withoutServlets": [],
 "custom": {}
}

Now, we can register the Node with custom JSON configuration file using the below command. The command line switch is -nodeConfig followed by the JSON configuration file name. This file should define the node properties and overrides the default values for the node.

\>java -jar <selenium-server-standalone-version.jar> -role node -nodeConfig node.json

 

JSON Configuration File

 

We can check the Node configuration by launching the Grid console.

Launch Grid console and Click on the Configuration button. When multiple nodes are registered choose the respective node to check the configuration.

 

Selenium Grid Node Configuration

—

Selenium WebDriver Tutorials on this website can be found at:

https://www.testingdocs.com/selenium-webdriver-tutorial

For more details on the Selenium, visit the official website at:

https://www.selenium.dev/

Related Posts

Selenium Server Error

Selenium Grid /

Selenium Server Error: No drivers have been configured

Selenium4_Grid_Architecture

Selenium Grid /

Selenium 4 Grid Architecture

Selenium4_Grid_Components

Selenium Grid /

Selenium Grid 4.x Distributed Mode

Selenium 4 Standalone Grid

Selenium Grid /

Different Selenium Grid Modes in Selenium 4.0

Selenium grid foreground

Selenium Grid /

Run Selenium Grid in Background on Linux

‹ Selenium Grid Hub JSON Configuration› Selenium Grid 2.0 Overview

Recent Posts

  • How to secure your SQL Database: Tips and Tricks
  • Shaping the Future of Development: Exploring Key Trends in Software Engineering
  • Improving Java Performance with Multithreading
  • Difference between PHP and JavaScript?
  • Bing Conversation Styles
  • ChatGPT Introduction
  • Open Source AI Frameworks
  • Artificial Intelligence Tools
  • Top AI Music Applications
  • Top AI Website Design Tools

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com