首页 > 解决方案 > 机器人框架的 WebDriverException 错误

问题描述

尝试使用我的 test_ios_app.robot 文件向 iphone 发送命令

已经启动 web driver agent runner,运行在 8100 端口

*** Settings ***
Library AppiumLibrary
*** Variables ***
${REMOTE_URL} http://XXX.XXX.XXX.XXX:8100/
${PLATFORM_NAME} iOS
${PLATFORM_VERSION} 12.1
${DEVICE_NAME} iPhonesimulator
#Appium uses the *.app directory that is created by the ios build to provision the emulator.   
${APP_LOCATION} /Users/XXX/Library/Developer/Xcode/DerivedData/WebDriverAgent-ezvfffwkjpaaegaeahoqnwqrrqrc/Build/Products/Debug-iphonesimulator/IntegrationApp.app
${BUNDLE_ID} com.facebook.IntegrationApp-testnblog

*** Keywords ***
    Open App
    Open Application ${REMOTE_URL}
    platformName=${PLATFORM_NAME}
    platformVersion=${PLATFORM_VERSION}
    deviceName=${DEVICE_NAME}
    app=${APP_LOCATION}
    automationName=appium
    bundleId=${BUNDLE_ID}

Close All Apps
    Close All Applications

*** Test Cases ***
test_demo    
    Open App    
    Close All Apps

不太清楚发生了什么。我在 xcode 上启动了应用程序并发送了命令 --> Robot test_ios_app.robot 它向我显示了这个错误。

在此处输入图像描述

好像我的 REMOTE_URL 有问题?

如果您有任何问题,请随时告诉我。

标签: robotframeworkrobots.txt

解决方案


原来我忘了通过执行appium &来启动 appium 服务器

所以出现了一些连接问题。

这是一个非常好的指南,帮助我解决了我的问题。

http://testnblog.com/ios-automation-with-appium-1-6-robot-framework/


推荐阅读