测试之家
  • Topics
  • QA
  • 招聘
  • 社区学堂新
  • 开源项目
  • 活动
  • Wiki
  • Sign Up
  • Sign In
会员
mads (恺)
第 2265 位Users / 2015-01-06
mimi @ 杭州
59 篇帖子 • 1005 条回帖
195 关注者
39 正在关注
15 收藏
开源力量
打赏支持
GitHub Public Repos
  • xn_android_special_test 0

  • webdriver-frame 0

    webdriver frame

More on GitHub
  • 个人信息
  • 专栏
  • 话题
  • 回帖
  • 收藏
  • 关注中
  • 关注者
  • 【已解决】appium 问题-运行 android native 拨号应用测试脚本报错 at May 29, 2015

    #16 楼 @yuwuhen333 main 就是默认全部运行了吧

  • 新手学 appium-HTMLTestRunner 测试报告的导出 demo at May 29, 2015

    #8 楼 @xdlhy 别人的东西,不能直接拿来用啊。。我的帖子都是原创的。。

  • 【已解决】appium 问题-运行 android native 拨号应用测试脚本报错 at May 29, 2015

    #14 楼 @yuwuhen333 10 个 py?每个都打个包,然后 import 到一个 py 中

  • 新手学 appium-python-appium 的 hybrid 应用如何获取 native 跟 webview 的值 at May 28, 2015

    #7 楼 @li4239419 没

  • 【已解决】appium 问题-运行 android native 拨号应用测试脚本报错 at May 28, 2015

    #12 楼 @yuwuhen333 你详细描述下你的需求

  • 新手学 appium-python-appium 的 hybrid 应用如何获取 native 跟 webview 的值 at May 27, 2015

    #5 楼 @anikikun 效果一样的,一直这样,报错信息,是我强行关掉 appium 的服务窗口出现的

  • 新手学 appium-python-appium 的 hybrid 应用如何获取 native 跟 webview 的值 at May 27, 2015

    #3 楼 @anikikun

    ['NATIVE_APP', 'WEBVIEW_com.travelsky.bluesky']
    Traceback (most recent call last):
      File "D:\appium\ccarehybridtest.py", line 22, in <module>
        dr.switch_to.context("WEBVIEW_com.travelsky.bluesky")
      File "C:\Python34\lib\site-packages\appium\webdriver\switch_to.py", line 31, in context
        self._driver.execute(MobileCommand.SWITCH_TO_CONTEXT, {'name': context_name})
      File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 173, in execute
        response = self.command_executor.execute(driver_command, params)
      File "C:\Python34\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 349, in execute
        return self._request(command_info[0], url, body=data)
      File "C:\Python34\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 417, in _request
        resp = opener.open(request)
      File "C:\Python34\lib\urllib\request.py", line 463, in open
        response = self._open(req, data)
      File "C:\Python34\lib\urllib\request.py", line 481, in _open
        '_open', req)
      File "C:\Python34\lib\urllib\request.py", line 441, in _call_chain
        result = func(*args)
      File "C:\Python34\lib\urllib\request.py", line 1210, in http_open
        return self.do_open(http.client.HTTPConnection, req)
      File "C:\Python34\lib\urllib\request.py", line 1185, in do_open
        r = h.getresponse()
      File "C:\Python34\lib\http\client.py", line 1171, in getresponse
        response.begin()
      File "C:\Python34\lib\http\client.py", line 351, in begin
        version, status, reason = self._read_status()
      File "C:\Python34\lib\http\client.py", line 313, in _read_status
        line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
      File "C:\Python34\lib\socket.py", line 374, in readinto
        return self._sock.recv_into(b)
    [Decode error - output not utf-8]
    
  • 处女座用例——实现一个 apk 的二级页面的点击操作,很激动,与大家分享下吧~ at May 26, 2015

    为什么叫处女座用例

  • [已解决]运行 reset.bat 或者 npm install -g appium at May 26, 2015

    选个稳定点的 nodejs,0.10.25 不错~

  • appium 1.4+python 2.7.9 参考 android_contacts.py 无法输入中文,求举例 at May 26, 2015

    #17 楼 @yuwuhen333 不了解,webview 的定位,你可以先了解下 webdriver

  • appium 1.4+python 2.7.9 参考 android_contacts.py 无法输入中文,求举例 at May 26, 2015

    #14 楼 @yuwuhen333 webview 是 HTML 格式,xpath,css,name,id 都可以定位

  • appium 1.4+python 2.7.9 参考 android_contacts.py 无法输入中文,求举例 at May 26, 2015

    #13 楼 @yuwuhen333 什么意思?uiautomatorview 还是 uiautomator,说清楚

  • appium 1.4+python 2.7.9 参考 android_contacts.py 无法输入中文,求举例 at May 25, 2015

    #10 楼 @mads xpath

  • 求助 appium 在 webview 模式下,使用 get_screenshot 方法报错,有木有谁碰到过的。 at May 25, 2015

    #1 楼 @wang04170 你测的是 hybrid 应用么

  • webviewv36 支持的 Remote Debugging 特性以及与 appium 的关系 at May 25, 2015

    #6 楼 @qddegtya 你好,我用了你得 demo 试了一下,没能成功
    报错信息如下,然后我加了 platformName 跟 deviceName 上去,还是同样的报错~

    Traceback (most recent call last):
      File "D:\appium\ccarehybridtest1.py", line 20, in <module>
        driver = webdriver.Remote("http://192.168.10.56:9515/wd/hub", capabilities)
      File "C:\Python34\lib\site-packages\appium\webdriver\webdriver.py", line 35, in __init__
        super(WebDriver, self).__init__(command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
      File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 74, in __init__
        self.start_session(desired_capabilities, browser_profile)
      File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 123, in start_session
        'desiredCapabilities': desired_capabilities,
      File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 175, in execute
        self.error_handler.check_response(response)
      File "C:\Python34\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 166, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: platformName, deviceName)
    
    [Finished in 1.1s with exit code 1]
    
  • appium 1.4+python 2.7.9 参考 android_contacts.py 无法输入中文,求举例 at May 25, 2015

    #9 楼 @yuwuhen333 http://www.cnblogs.com/wyx123/articles/4482073.html

  • 关于 appium get_attribute 方法的坑 at May 21, 2015

    好长,辛苦了!

  • 新手学 appium-HTMLTestRunner 测试报告的导出 demo at May 21, 2015

    #6 楼 @zwq0216 ?我暂时只用 py。。。

  • 【已解决】appium 运行模拟器的测试 apk 运行报错 at May 21, 2015

    #5 楼 @sunrise 这就是模拟器啊。。。

  • 新手学 appium-HTMLTestRunner 测试报告的导出 demo at May 20, 2015

    #1 楼 @lucasluo 多谢多谢,近期我会抽时间弄个合集的

  • 新手学 appium-HTMLTestRunner 测试报告的导出 demo at May 20, 2015

    #2 楼 @zwq0216 java 也有 testng,junit 的测试报告的

  • 切换到 webview 后,无论是获取 element,还是 pagesource 都无响应。 at May 19, 2015

    #18 楼 @chenhengjie123
    实际上我切换的代码就三行

    self.driver.implicitly_wait(10)
    a=self.driver.contexts
    print (a)
    
  • 切换到 webview 后,无论是获取 element,还是 pagesource 都无响应。 at May 19, 2015

    #18 楼 @chenhengjie123 请问 hybrid app,用 python 实现 hybrid 切换到 webview 怎么弄呢?
    我这样尝试的

    #coding=utf-8
    
    import os
    import unittest,sys,time,re,datetime,HTMLTestRunner
    from appium import webdriver
    from time import sleep
    from appium.common.exceptions import NoSuchContextException
    import sys
    from selenium.webdriver.support.ui import WebDriverWait
    
    #reload(sys)
    #sys.setdefaultencoding("utf-8") 
    
    # Returns abs path relative to this file and not cwd
    PATH = lambda p: os.path.abspath(
        os.path.join(os.path.dirname(__file__), p)
    )
    
    class ContactsAndroidTests(unittest.TestCase):
        def setUp(self):
            desired_caps = {}
            desired_caps['platformName'] = 'Android'
            desired_caps['platformVersion'] = '4.4'
            desired_caps['deviceName'] = '192.168.56.101:5555'
            '''desired_caps['app'] = PATH(
                '../../../sample-code/apps/ContactManager/ContactManager.apk'
            )'''
            desired_caps['appPackage'] = 'com.jiudao.ccare'
            desired_caps['appActivity'] = '.MainActivity'
            desired_caps["unicodeKeyboard"] = "True"
            desired_caps["resetKeyboard"] = "True"
    
    
            self.driver = webdriver.Remote('http://192.168.10.177:4723/wd/hub', desired_caps)
            #self.driver.implicitly_wait(1)
    
        def login(self):
            #登录操作
            #time.sleep(3)
            self.driver.implicitly_wait(10)
            a=self.driver.contexts
            print (a)
            self.driver.switch_to.context("pt1.1")
    
    if __name__ == '__main__':
        suite = unittest.TestSuite()
        suite.addTest(ContactsAndroidTests("login"))
        timestr = time.strftime('%Y%m%d%H%M%S',time.localtime(time.time()))
        filename = "D:\\appium\\appiumresult\\result_" + timestr + ".html"
        print (filename)
        fp = open(filename, 'wb')
        runner = HTMLTestRunner.HTMLTestRunner(
                    stream=fp,
                    title='测试结果',
                    description='测试报告'
                    )
        runner.run(suite)
        #g_browser.quit()
        fp.close() #测试报告关闭
    

    这是我获得的测试报告,我 print 出来的东西是 pt1.1

  • 新手学 appium-数据参数化,字典实现 at May 19, 2015

    #1 楼 @lihuazhang 好的

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

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