测试之家
  • 社区
  • 问答
  • 招聘
  • 社区学堂新
  • 开源项目
  • 活动
  • Wiki
  • 注册
  • 登录
新手
sophia_sun1191 (莫小贝)
第 1710 位会员 / 2014-10-15
3 篇帖子 • 13 条回帖
3 关注者
1 正在关注
0 收藏
未设置 GitHub 信息.
  • 个人信息
  • 专栏
  • 话题
  • 回帖
  • 收藏
  • 关注中
  • 关注者
  • 热门话题
  • 最近回帖
  • Appium 新手请教:appium+python 如何实现用坐标在安卓手机屏幕上的点击事件
    1 个赞 / 17 条回复
  • Appium 新手求教:self.driver.swipe()执行完动作为啥总是报错 WebDriverException: Message: u'An unknown server-side error occurred while processing the command.'
    0 个赞 / 17 条回复
  • Appium appium python android 里如何实现引导页面的滑动?self.driver.swipe (75,500,75,0,0.8) 不工作
    0 个赞 / 14 条回复
  • [已解决]Python+Appium 如何在此类型输入框进行输入 at 2014年11月07日

    把手机上安装的输入法都卸掉,用系统自带的输入法试试

  • Python + Appium 1.2.2, 关于长按 duration 的问题 at 2014年11月07日

    #2 楼 @sophia_sun1191 解决了 无须用 TouchAction, 应该是直接用 self.driver.tap([(65,10),])

  • 新手求教:self.driver.swipe()执行完动作为啥总是报错 WebDriverException: Message: u'An unknown server-side error occurred while processing the command.' at 2014年11月07日

    #4 楼 @lena @xiaomayi0323 感谢各位的帮忙,这个问题已经大概知道怎么回事啦 (虽然没有解决:().
    引导页面共有 4 页,从引导第一页滑动到引导的最后一页,应用上面代码循环 3 次,脚本结果是 pass 的,只有从引导图最后一页滑动到应用的主界面(首页)时,才会报错 An unknown server-side error.(进入应用主界面后,继续利用该循环滑动也是 pass 的)
    咨询了一下 android 开发的同事,从引导第一页滑动到引导的最后一页 和 进入应用主界面后继续利用循环滑动几次,其实都是在一个安卓界面的滑动,但是从引导图最后一页滑动到应用的主界面,是两个安卓界面的切换,本质区别在这.
    但是对于我们来说都是一个滑动操作,不知道为啥同样用 swipe()方法就有错,其实它已经滑动到主界面成功了就是最后的结果是 failed, 而且主界面一显示立马报错,很奇怪.... 感觉是 swipe() 方法不同界面切换有问题

    @xiaomayi0323 也不是 duration 的问题,我最后把代码改成下面的,把最后一次滑动单独拿出来加长 duration 也还是不行

  • 新手请教:appium+python 如何实现用坐标在安卓手机屏幕上的点击事件 at 2014年11月07日

    #14 楼 @xiaomayi0323 @strayeagle 豁然领悟,非常感谢

  • 新手请教:appium+python 如何实现用坐标在安卓手机屏幕上的点击事件 at 2014年11月06日

    #12 楼 @strayeagle 那请问我下面的代码哪里语法错误?实在是没有看出来,谢谢! 错误提示行是 action.tap(65,10).perform(), (65,10) 是我要点击的坐标

    def test_someActions(self):
    sleep(8)
    buttons = self.driver.find_elements_by_class_name("android.widget.Button")
    buttons[1].click()
    action = TouchAction(self.driver)
    action.tap(65,10).perform()
    sleep(5)

  • Python + Appium 1.2.2, 关于长按 duration 的问题 at 2014年11月05日

    https://github.com/appium/python-client
    tap

    The tap method stands alone, being unable to be chained with other methods. If you need a tap-like action that starts a longer chain, use press.

    It can take either an element with an optional x-y offset, or absolute x-y coordinates for the tap, and an optional count.

    el = self.driver.find_element_by_accessibility_id('Animation')
    action = TouchAction(self.driver)
    action.tap(el).perform()
    el = self.driver.find_element_by_accessibility_id('Bouncing Balls')
    self.assertIsNotNone(el)

    以上是在 github 上看到的 or absolute x-y coordinates for the tap, and an optional count 这句的意思应该是只用坐标也可以完成 tap 方法吧? 我想完成只用坐标比如(65,10)的点击事件不需要 element,怎么用了以后报错?
    代码如下:
    def test_someActions(self):
    sleep(8)
    buttons = self.driver.find_elements_by_class_name("android.widget.Button")
    buttons[1].click()
    action = TouchAction(self.driver)
    action.tap(65,10).perform()
    sleep(5)

  • 新手请教:appium+python 如何实现用坐标在安卓手机屏幕上的点击事件 at 2014年11月05日

    #10 楼 @xiaomayi0323 ,我也知道是坐标,我就点击一个地方的坐标(65,10),为啥要写三个坐标??
    github 上找到 tap 的用法如下:
    https://github.com/appium/python-client
    tap

    The tap method stands alone, being unable to be chained with other methods. If you need a tap-like action that starts a longer chain, use press.

    It can take either an element with an optional x-y offset, or absolute x-y coordinates for the tap, and an optional count.

    el = self.driver.find_element_by_accessibility_id('Animation')
    action = TouchAction(self.driver)
    action.tap(el).perform()
    el = self.driver.find_element_by_accessibility_id('Bouncing Balls')
    self.assertIsNotNone(el)

    or absolute x-y coordinates for the tap, and an optional count. 这句不是说可以用坐标 tap 吗 为啥我用报错,代码如下:
    def test_someActions(self):
    sleep(8)
    buttons = self.driver.find_elements_by_class_name("android.widget.Button")
    buttons[1].click()
    action = TouchAction(self.driver)
    action.tap(65,10).perform()
    sleep(5)

  • 新手请教:appium+python 如何实现用坐标在安卓手机屏幕上的点击事件 at 2014年11月05日

    #8 楼 @appium_bob swipe 把最后的时间设置短一些也可以完成点击屏幕的操作,用 tap 方法一样报 unknown server side error
    driver.tap([(100, 20), (100, 60), (100, 100)], 500), 话说这个 tap 方法里面的(100,100)是啥

  • appium python android 里如何实现引导页面的滑动?self.driver.swipe (75,500,75,0,0.8) 不工作 at 2014年11月04日

    #3 楼 @appium_bob yes, 800 是对的 已经解决了 谢谢

  • 新手请教:appium+python 如何实现用坐标在安卓手机屏幕上的点击事件 at 2014年11月04日

    #5 楼 @appium_bob swipe() 方法不好用吗

    你的意思是让我按照你上面的方法,改成 python 写法吗

关于 / 活跃用户 / 中国移动互联网测试技术大会 / 反馈 / Github / API / 帮助推广
TesterHome社区,测试之家,由众多测试工程师组织和维护的技术社区,致力于帮助新人成长,提高测试地位,推进质量发展。Inspired by RubyChina
友情链接 WeTest腾讯质量开放平台 / InfoQ / 掘金 / SegmentFault / 测试窝 / 百度测试吧 / IT大咖说
简体中文 / 正體中文 / English

©testerhome.com 测试之家   渝ICP备2022001292号
  渝公网安备 50022202000435号    版权所有 © 重庆年云聚力信息技术有限公司