• 这么好的帖子,感谢大佬

  • 感觉appium群众基础更大一些吧

  • STF 怎么去掉 URL 中的!# at March 03, 2020

    谢谢大佬,我研究一下这个文件

  • 我安装了最新的版本,但是还是不支持Android10呀。一直报错:
    2020-02-27T08:25:03.538Z FTL/util:lifecycle 33358 [2KE0219A31008451] Shutting down due to fatal error
    2020-02-27T08:25:03.547Z INF/provider 33322 [] Cleaning up device worker "2KE0219A31008451"
    2020-02-27T08:25:03.547Z ERR/provider 33322 [
    ] Device worker "2KE0219A31008451" died with code 1

  • 从自己的平台直接跳转到设备控制的页面,想把stf改成免登陆,然后怎么从设备列表进去设备控制页,或者看您之前的回复免登录之后直接调用接口嘛?

  • 加群了,楼主同意一下呀

  • STF 手机兼容性问题 at December 13, 2019

    楼主,我小米和魅族手机也遇到这些问题,提示:2019-12-13T03:56:23.292Z FTL/device 99797 [qc6hz5rs99lnswgq] Setup had an error Error: Failed more than 3 times in 10000ms
    自启动已经打开,小米手机安全设置也打开了,但是还是这个报错

  • 有没有大佬遇到过这两个手机

  • STF 连接小米终端问题 at December 13, 2019

    你好,我的红米手机也遇到这个问题,请问现在解决了嘛,APK安装上了,而且安全设置也打开了

  • STF 集成 iOS 之 开源了 at December 11, 2019

    我进入到stf的目录,执行了一下npm install,多执行几次就好了

  • 就是用app-inspector看UI树状图,可以直接看到定位到webview的元素,但是我用appium启动找不到这个元素,提示我遇到的这个错误,xpath、text、坐标点击都用到了,就是不能在这个webview上用appium来进行操作

  • 加了之后启动报错:selenium.common.exceptions.WebDriverException: Message: No such context found.,可以加下您QQ或者微信问您吗

  • 当前页面其他非webview可以用xpath定位,就是webview上的元素不能点击,坐标点击也不能点击,就是对webview上的元素操作不了,打印上下文contexts就只有native_app,没有webview相关

  • pagesource打印是能找到元素的,我用WebDriverWait试了也是报错,提示找不到元素

  • 有没有大佬来帮帮我

  • 这是appium日志的报错:

    [HTTP] {"using":"xpath","value":"//android.support.v4.view.ViewPager[1]/android.widget.RelativeLayout[1]/android.webkit.WebView[1]/android.webkit.WebView[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[2]/android.widget.ListView[1]/android.view.View[1]/android.widget.GridView[2]/android.view.View[1]/android.view.View[3]","sessionId":"d4433388-3306-4810-b75d-a22905514d93"}
    [debug] [W3C (d4433388)] Calling AppiumDriver.findElement() with args: ["xpath","//android.support.v4.view.ViewPager[1]/android.widget.RelativeLayout[1]/android.webkit.WebView[1]/android.webkit.WebView[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[2]/android.widget.ListView[1]/android.view.View[1]/android.widget.GridView[2]/android.view.View[1]/android.view.View[3]","d4433388-3306-4810-b75d-a22905514d93"]
    [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
    [debug] [BaseDriver] Waiting up to 0 ms for condition
    [debug] [WD Proxy] Matched '/element' to command name 'findElement'
    [debug] [WD Proxy] Proxying [POST /element] to [POST http://localhost:8257/wd/hub/session/56592bc2-90df-486a-b370-785de3a90a87/element] with body: {"strategy":"xpath","selector":"//android.support.v4.view.ViewPager[1]/android.widget.RelativeLayout[1]/android.webkit.WebView[1]/android.webkit.WebView[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[2]/android.widget.ListView[1]/android.view.View[1]/android.widget.GridView[2]/android.view.View[1]/android.view.View[3]","context":"","multiple":false}
    [WD Proxy] Got an unexpected response: {"sessionId":"56592bc2-90df-486a-b370-785de3a90a87","status":7,"value":"An element could not be located on the page using the given search parameters."}
    [debug] [MJSONWP] Matched JSONWP error code 7 to NoSuchElementError
    [debug] [W3C (d4433388)] Encountered internal error running command: NoSuchElementError: An element could not be located on the page using the given search parameters.
    [debug] [W3C (d4433388)] at AndroidUiautomator2Driver.findElOrEls (/usr/local/homebrew/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/find.js:75:11)
    [debug] [W3C (d4433388)] at <anonymous>
    [HTTP] <-- POST /wd/hub/session/d4433388-3306-4810-b75d-a22905514d93/element 404 635 ms - 416
    [HTTP]


    这个是控制台的报错:

    Traceback (most recent call last):
    File "/Users/liyaoyao/Documents/basebbs-all-autotest/iOSAutoTest/iOSAppiumTest/Android.py", line 26, in <module>
    browser.find_element_by_xpath("//android.support.v4.view.ViewPager[1]/android.widget.RelativeLayout[1]/android.webkit.WebView[1]/android.webkit.WebView[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[2]/android.widget.ListView[1]/android.view.View[1]/android.widget.GridView[2]/android.view.View[1]/android.view.View[3]").click()
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/appium/webdriver/webdriver.py", line 258, in find_element
    'value': value})['value']
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 29, in check_response
    raise wde
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/appium/webdriver/errorhandler.py", line 24, in check_response
    super(MobileErrorHandler, self).check_response(response)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.

  • 我pagesource也是可以打印webview中的元素的,但是driver.find_element就是一直提示找不到

  • STF 集成 iOS 之 开源了 at November 20, 2019


    我按照教程按照了,npm install也没有报错,然后启动的时候报一堆错误,是需要重新再安装sudo npm install -g stf吗?还是别的步骤不对

  • STF 集成 iOS 之 开源了 at November 20, 2019

    stf支持iOS13吗

  • 对呀,不关掉macaca的app-inspector会起冲突,不知道还有什么方法比较友好的可以获取iOS和Android的UI树状图

  • 或者说除了 app-inspector还有其他查看元素的,网页的这种

  • 我试过subprocess.Popen去启动命令,还是不能多进程并发,我的启动代码张这样
    def start_appium():
    post_num = 4723
    wad = 8010
    while check_port(post_num):
    post_num = post_num + 2
    while check_port(wad):
    wad = wad + 1
    # 根据系统,启动对应的服务
    cmd_dict = {
    'MAC': f'appium -a 127.0.0.1 -p {post_num} --webdriveragent-port {wad} --log xxx.log --local-timezone & '
    }
    #os.system(cmd_dict['MAC'])
    subprocess.Popen(cmd_dict['MAC'], shell=True)
    time.sleep(5) # 等待启动完成
    print('appium启动成功')
    return post_num
    我之前看文章,Windows上可以直接用start /b去开启新窗口,但是Mac没有这个命令,试过subprocess.Popen也不行,手动打开终端去开启几个服务这样并发我之前一直上这么做的,现在就想实现用时再启动

  • 我是Mac系统,所以start命令提示找不到,在Mac中有没有类似于start命令的指令呀,还有我试了一下自带的AppiumServer,

    service = AppiumService()
    service.start(args=['--address', '127.0.0.1', '-p', '4723'], timeout_ms=2000)一直报错,:

    File "/Users/hpcl201901056/Documents/Autotest_platform/Autotest_platform/helper/util.py", line 86, in start_appium
    service.start(args=['--address', '127.0.0.1', '-p', '4723'], timeout_ms=2000)
    File "/Users/hpcl201901056/Documents/Autotest_platform/venv/lib/python3.6/site-packages/appium/webdriver/appium_service.py", line 159, in start
    main_script = kwargs['main_script'] if 'main_script' in kwargs else self._get_main_script()
    File "/Users/hpcl201901056/Documents/Autotest_platform/venv/lib/python3.6/site-packages/appium/webdriver/appium_service.py", line 105, in _get_main_script
    raise AppiumServiceError(e.output)
    appium.webdriver.appium_service.AppiumServiceError: b''

  • 我测试过程中发现需要开两个终端窗口开启新进程,两台iOS设备才能并发运行,所以想问一下,怎么用脚步开启一个新窗口进程启动服务

  • 还有怎么多进程启动appium服务呀