Selenium Grid
Selenium Grid
You are able to register your appium server with a local Selenium grid (setup docs) by using the --nodeconfig
server parameter.//将appium server注册到selenium grid使用。
> appium --nodeconfig /path/to/nodeconfig.json # or, if running from source: > node . --nodeconfig /path/to/nodeconfig.json
In the node config file you have to define the browserName
, version
and platform
and based on these parameters the grid will re-direct your test to the right device. You will also need to configure your host details and the selenium grid details. For a full list of all parameters and descriptions look here
Once you start the appium server and it registers with the grid, you will see your device on the grid console page:
“http://<grid-ip-adress>:<grid-port>/grid/console”
Grid Node Configuration Example json file
{
"capabilities":
[
{
"browserName": "<e.g._iPhone5_or_iPad4>",
"version":"<version_of_iOS_e.g._7.1>",
"maxInstances": 1,
"platform":"<platform_e.g._MAC_or_ANDROID>"
}
],
"configuration":
{
"cleanUpCycle":2000,
"timeout":30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"url":"http://<host_name_appium_server_or_ip-address_appium_server>:<appium_port>/wd/hub",
"host": <host_name_appium_server_or_ip-address_appium_server>,
"port": <appium_port>,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": <grid_port>,
"hubHost": "<Grid_host_name_or_grid_ip-address>"
}
}
Valid platforms are listed here
If url
, host
, and port
are not given, the config will be auto updated to point to localhost:whatever-port-Appium-started-on.
If your Appium server is running on a different machine to your Selenium Grid server, make sure you use an external name/IP address in your host
& url
docs; localhost
and 127.0.0.1
will prevent Selenium Grid from connecting correctly.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律