我正试图在selenium hub上运行testcafe。
我的命令。
docker network create network
docker run -d -p 4444:4444 --net network --name selenium-hub selenium/hub
docker run -d -e HUB_PORT_4444_TCP_ADDR=selenium-hub -e HUB_PORT_4444_TCP_PORT=4444 --shm-size=2gb -v /dev/shm:/dev/shm --network network --name chrome selenium/node-chrome
docker run -d -e HUB_PORT_4444_TCP_ADDR=selenium-hub -e HUB_PORT_4444_TCP_PORT=4444 -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --shm-size=2gb -v /dev/shm:/dev/shm -e CONNECT_TO_GRID=true -e APPIUM=true --network network --name chrome-mobile -e SELENIUM_HOST=selenium-hub -e MOBILE_WEB_TEST=true -e APPIUM_PORT=4723 butomo1989/docker-android-arm-7.1.1
我使用这个包来连接到Hub:testcafe-browser-provider-selenium。https:/www.npmjs.compackagetestcafe-browser-provider-selenium
我可以看到两种配置在 http:/localhost:4444gridconsole。
我可以使用linux chrome运行测试。
testcafe selenium:chrome:Linux my_first_test.js
但我无法在安卓chrome上运行测试。
[my_first_project (master)]$ testcafe selenium:chrome:Android my_first_test.js
Using locally installed version of TestCafe.
The "src", "browsers" options from the configuration file will be ignored.
ERROR Was unable to open the browser "selenium:chrome:Android" due to error.
SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): 'deviceName' can't be blank
at Object.checkLegacyResponse (/Users/abc/node_modules/selenium-webdriver/lib/error.js:585:15)
请帮助我解决这个问题.我的最终目标是能够在CI中的移动浏览器上运行chrome,不想使用像browserstack这样的云浏览器。如果android image不能工作,我对其他想法持开放态度。
这个包与我们的产品无关。但我看到你已经联系了它的作者。https:/github.comalexschwantestcafe-browser-provider-seleniumissues14。. 所以,据我了解,它并没有提供对Android的支持。