1. Download the image
Note: selenium/node-firefox and selenium/node-chrome are both headless. To see the real-time running interface, you need to use one of the following two images.
2. Start the Docker of the Hub node docker run -p 4444:4444 -d --name hub selenium/hub Parameter Description:
3. Start the Docker of Node
Or a Node with a Debug interface docker run -d -p 5900:5900 --link hub:hub selenium/node-chrome-debug Parameter Description: --link is a link to the container with the alias hub. 4. Install and configure VNC VNC (Virtual Network Console) is the abbreviation of virtual network console. It is an excellent remote control tool software, a free open source software based on UNIX and Linux operating systems, with powerful remote control capabilities, efficient and practical. Download address: https://www.realvnc.com/en/connect/download/viewer/ 5. Test code To use the Selenium Grid service, you need to use the webdriver.Remote method to connect to the service and pass in the desired_capbilities desired capabilities. The sample script is as follows. from time import sleep from selenium import webdriver driver = webdriver.Remote( command_executor = 'http://192.168.99.100:4444/wd/hub', desired_capabilities={'browserName': 'chrome'} ) driver.get('https://www.baidu.com') print("start run") sleep(1) print(driver.title) driver.quit() print("end...") The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: A brief discussion on Vue3 father-son value transfer
>>: 4 solutions to mysql import csv errors
The communication modes of vue3 components are as...
This article shares the specific code of Vue to i...
MySQL v5.7.19 official version (32/64 bit install...
Table of contents 1. Database Overview 1.1 Develo...
Table of contents How to start mysqld Method 1: m...
Table of contents Introduction effect principle f...
The META tag is an auxiliary tag in the head area...
1.1 Copy the nginx installation package and insta...
Table of contents Written in front router.json Ro...
Preface The SQL mode affects the SQL syntax that ...
Usually, there are two options when we develop Li...
Use of AES encryption Data transmission encryptio...
This article mainly explains how to install the M...
This article uses an example to illustrate the pa...
Table of contents 1. JavaScript Objects 1).Array ...