Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Network configuration of selenium

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Selenium grid

A Selenium grid is a tool that distributes multiple physical or virtual machine tests, allowing us to execute scripts in parallel (at the same time), resulting in the required test run time. This gives us fast and accurate feedback that greatly speeds up cross-browser and cross-platform testing.

Selenium Grid enables us to perform parallel webdriver or Selenium remote control tests, which use the same code on the basis, so the code does not have to exist on multiple instances of their execution system. The separate packages for the Selenium server include hub, webdriver, and Selenium RC grid execution scripts.

Selenium grid has hubs and nodes

Hub-the hub can also be understood to mean that the test where the server acts as the central point will be triggered. The Selenium grid has only one hub, which starts once on a machine.

The Node-Node is the hub where the Selenium instance is attached to the hub that will perform the test. Can exist in which it can be any operating system and can contain one or more nodes of any supported browser Selenium grid.

Configure Hub

First of all, you need to go to the selenium website http://docs.seleniumhq.org/download/ to download the latest Selenium server independent JAR file.

Then use the following command to start the hub. For example, use port "1111" to start the hub.

Note: please make sure that port # 1111 is not being used by other applications.

Go to the folder where selenium-server-standalone-3.8.1.jar is placed and run the command:

Java-jar selenium-server-standalone-3.8.1.jar-port 1111-role hub

Open http://localhost:1111 and select console

Currently, there are no nodes configured.

You can run the following command to configure the node

Java-Dwebdriver.chrome.driver= Desktop: chromedriver.exe-jar E:\ study area\ selenuim\ selenium-server-standalone-3.8.1.jar-role webdriver-hub http://localhost:1111/grid/register-browser browserName=chrome,platform=WINDOWS-port 5557

The following is the successful configuration of the chrome node

Then create the project

Enter in xml

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report