我希望以编程方式处理服务器超时。
我的密码是这样的。
SelendroidConfiguration config = new SelendroidConfiguration();
config.addSupportedApp("apk/test.apk");
selendroidServer = new SelendroidLauncher(config);
URL url = new URL("http://localhost:4444/wd/hub");
// -------------------------------------------------------
SelendroidCapabilities test= SelendroidCapabilities
.device("com.test.android:1.0");
driver = new SelendroidDriver(url, test);
发布于 2022-09-24 07:59:30
虽然不适用于SelendroidConfiguration
,但当使用docker单独启动selenium时,SE_OPTS
中的--session-timeout
标志工作如下:
docker run -d -p 4445:4444 -p 5901:5900 -p 7901:7900 -e SE_OPTS="--session-timeout 1000" --shm-size=2g selenium/standalone-chrome:105.0
但是,它不适用于standalone-chrome-debug
:
docker run -d -p 4445:4444 -p 5901:5900 -p 7901:7900 -e SE_OPTS="--session-timeout 100" --shm-size=2g selenium/standalone-chrome-debug:3.141.59-20210607
https://stackoverflow.com/questions/30735061
复制相似问题