我尝试在我的android中打开chrome浏览器,使用robotframework和这个脚本
*** Settings ***
Documentation A resource for global
Library Selenium2Library timeout=15
*** Variable ***
${COMMAND_EXECUTOR} http://localhost:4723/wd/hub
${BROWSER} Chrome
${PLATFORM_NAME} Android
${UDID} FF786D96CB71039D
*** Test Case ***
Test Case Open Chrome In Real Device
Open Android Browser https://www.google.co.id
*** Keywords ***
Open Android Browser
[Documentation] To open android default browser (not chrome) and go to provided URL
[Arguments] ${url}
${capabilities}= Create Dictionary browserName=${BROWSER} platformName=${PLATFORM_NAME} udid=${UDID} deviceName=${PLATFORM_NAME}
Create Webdriver Remote command_executor=${COMMAND_EXECUTOR} desired_capabilities=${capabilities}
Go To ${url}
问题是当我尝试运行它时,出现错误
==============================================================================
Testcase 2 :: A resource for global
==============================================================================
[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
Test Case Open Chrome In Real Device | FAIL |
URLError: <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>
------------------------------------------------------------------------------
Testcase 2 :: A resource for global | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
我尝试使用 Robot Framework 脚本和 chromedriver 在 Android 设备中打开 Chrome 浏览器中的实现?,
但仍然失败。在我运行这个测试之前,我的 andorid 中是否有任何设置?必须创建一个测试服务器还是什么?感谢您的帮助