miqsel是一个利用Selenium容器镜像的Python CLI工具,它可以有效地管理Selenium服务器,从而简化测试工作流程。
项目描述
miqsel
Miq Selenium服务器
miqsel
是一个Python CLI工具,利用Selenium容器镜像来有效地管理selenium服务器
并提供vnc
访问。
先决条件
-
Podman/Docker:
确保您的系统上已安装
podman
或docker
。 -
VNC查看器:
您可以选择任何VNC查看器,但大多数用户使用tigervnc。
- Fedora
sudo dnf install tigervnc
- 其他发行版的TigerVNC链接
- Fedora
安装
pip install miqsel --user
或
pip install git+https://github.com/digitronik/miqsel#egg=miqsel --user
使用
-
帮助:
❯❯❯ miqsel --help Usage: miqsel [OPTIONS] COMMAND [ARGS]... Miq Selenium Server Options: --version Show the version and exit. --help Show this message and exit. Commands: config Set Configuration executor Selenium executor URL start Start Selenium Server status Status of Selenium Server stop Stop Selenium Server viewer VNC viewer vnc VNC URL
-
状态:检查selenium容器状态(运行/停止)。
❯❯❯ miqsel status stopped
-
启动/停止:
❯❯❯ miqsel start Selenium Server started TigerVNC Viewer 64-bit v1.9.0 ❯❯❯ miqsel stop Sun Apr 28 12:29:02 2019 CConn: End of stream Selenium Server stopped
注意:默认情况下,
start
命令会调用vnc-viewer
。您可以使用miqsel start --no-viewer
停止它。 -
查看器:获取selenium服务器的
vnc
访问权限。在selenium服务器启动时,vnc查看器会自动调用。如果状态是running
并且查看器是关闭
的,那么查看器命令将帮助重新打开vnc会话。❯❯❯ miqsel status running ❯❯❯ miqsel viewer TigerVNC Viewer 64-bit v1.9.0
-
执行器:获取命令执行器URL
❯❯❯ miqsel executor http://172.17.0.2:4444/wd/hub
-
VNC:获取vnc会话URL
❯❯❯ miqsel vnc 172.17.0.2:5999
-
配置:管理miqsel配置并按需更改默认设置。
❯❯❯ miqsel config Container Engine (auto, podman, docker) [auto]: Selenium container image [selenium/standalone-chrome:latest]: VNC viewer (auto, vncviewer, vinagre, xdg-open) [auto]: Selenium server running on port? [4444]: VNC running on port? [5999]: Selenium container name [miqsel_container]: Selenium container network [default]: Selenium container shared Memory [2g]: Testing data mount to directory '/data' [default]: Configuration saved successfully...
selenium/standalone-chrome:latest
是默认镜像。您可以使用来自 SeleniumHQ 的其他镜像或自定义镜像。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源分布
miqsel-3.3.tar.gz (8.7 kB 查看哈希值)
构建分布
miqsel-3.3-py3-none-any.whl (6.9 kB 查看哈希值)