Appium robotframework-anywherelibrary 从安装到运行实例步骤

麦子 · 2014年05月12日 · 最后由 Ank 回复于 2016年07月15日 · 1545 次阅读
本帖已被设为精华帖!

robotframework-anywherelibrary 已经升级到 1.1.0 beta 版本,主要是为了适配 appium 1.0,以及对部分模块进行了重构。
1.1.0(beta)版本:https://github.com/luisxiaomai/robotframework-anywherelibrary

安装到运行实例步骤

  • 安装 python 2.7, 并且安装 pip 管理器
  • 安装 appium server: $ npm install -g appium
  • 启动 appium server: $ appium
  • 安装 robotframework-anywherelibrary: pip install robotframework-anywherelibrary(所有依赖都会安装)
  • 运行 sample code:
    • $ pybot --variable platform:chrome webviewTest.txt
    • $ pybot --variable platform:firefox webviewTest.txt
    • $ pybot --variable platform:iphone webviewTest.txt
    • $ pybot --variable platform:selendroid webviewTest.txt

简单写了下安装到运行 sample code 的步骤,有任何问题可以联系我,欢迎大家 fork,玩耍。。。

共收到 16 条回复 时间 点赞

i am getting this error when trying to execute sample webviewTest.txt. Firefox opens but quits unexpectedly. attached logs.Could you please help me.

$ pybot --variable platform:firefox webviewTest.txt

webviewTest

[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: AttributeError: 'NoneType' object has no attribute 'save_screenshot'
Search "robotframework-anywherelibrary" in google | FAIL |
Parent suite setup failed:

error: [Errno 61] Connection refused

[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: AttributeError: 'NoneType' object has no attribute 'save_screenshot'
webviewTest | FAIL |
Suite setup failed:
error: [Errno 61] Connection refused

Also suite teardown failed:
AttributeError: 'NoneType' object has no attribute 'quit'

1 critical test, 0 passed, 1 failed

1 test total, 0 passed, 1 failed

#13 楼 @nansen rft 里面有个 appium-lib 已经开源了. 在官方的 appium 里面有例子

请问含有 mobile gesture 关键字的 library 大神是否开源了?

麦子 #12 · 2014年05月20日 Author

@tmhlcwp 不明白这个灵活性是什么?

大神,用这个工具,如何解决灵活性的问题?

#8 楼 @luis 能否留个企鹅号,想好好请教下

#8 楼 @luis 那像点击,滑动等场景时该怎么写关键字!

@testing 有时间写下 UIautomator 的吧,不过 hybrid 里面已经包含了 native 的部分,虽然是用的 selendroid。

这个支持混合模式么!能否帮忙写些 native 的例子

#4 楼 @luis 谢谢 果然解决了!

不错,可以试试。

@lucktail ,请更新 selenium 到 2.41.0 :pip install selenium --upgrade.

[ ERROR ] Error in file '/Users/comtex/robotframework-anywherelibrary/sample-code/example/webviewTest.txt': Importing test library 'AnywhereLibrary' failed: ImportError: No module named switch_to

执行的时候会报错

求指导啊

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册