感谢,我试试
大家好,咨询个问题,windows 下面执行 tidevice+appium 报如下错误,各位大佬麻烦帮忙解决下:
[debug] [35m[XCUITest][39m UnknownError: An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided
[debug] [35m[XCUITest][39m at errorFromMJSONWPStatusCode (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:767:10)
[debug] [35m[XCUITest][39m at ProxyRequestError.getActualError (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:661:14)
[debug] [35m[XCUITest][39m at JWProxy.command (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:272:19)
[debug] [35m[XCUITest][39m at processTicksAndRejections (internal/process/task_queues.js:85:5)
[debug] [35m[XCUITest][39m Unable to start WebDriverAgent session because of xcodebuild failure: An unknown server-side error occurred while processing the command. Original error: 'bundleId' desired capability not provided Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
好
app 端不能绑定微信吗? 貌似没找到绑定的位置
好的,谢谢
请问有用 facebook-wda 操作过 webiew 吗?
现象再复述一下:
对应 chromedriver 驱动,开启 chrome 远程端口,发现会拉起本地 Chrome 浏览器(部分机型会出现该问题)
经过测试,如下:
总结:
不管什么手机的 webview,直接用 72 版本的 chromedriver 驱动(这个驱动版本稳定)就可以用,已经在以上 4 部手机实践过,没问题。
好的,谢谢回复,我看下
谢谢,忘记去搜索了
很赞,我也是厦门这边的测试
您好,有没有 QQ 或者 QQ 群之类,可以发下吗?
您好,电子书的网盘已经失效了,能否在上传一次
好的,谢谢
您好,
您好,我用的是 uiautomator2 框架, Appium 没问题
@codeskyblue , 不好意思,重新发一下代码
from __future__ import absolute_import
import atexit
import six
import os
import time
import platform
import psutil as pt
from selenium import webdriver
if six.PY3:
import subprocess
from urllib.error import URLError
else:
from urllib3 import URLError
import subprocess32 as subprocess
class ChromeDriver(object):
def __init__(self, u2, log, common, phone_name, port=9527):
self._u2 = u2
self._port = port
self.log = log
self.common = common
self.phone_name = phone_name
def _launch_webdriver(self):
self.log.info("start chromedriver instance")
chrome_driver_path = self.common.select_chromedriver(self.phone_name)
p = subprocess.Popen([chrome_driver_path, '--port=' + str(self._port)])
try:
p.wait(timeout=2.0)
return False
except subprocess.TimeoutExpired:
return True
def driver(self, device_ip=None, package=None, attach=True, activity=None, process=None):
"""
Args:
- package(string): default current running app
- attach(bool): default true, Attach to an already-running app instead of launching the app with a clear data directory
- activity(string): Name of the Activity hosting the WebView.
- process(string): Process name of the Activity hosting the WebView (as given by ps).
If not given, the process name is assumed to be the same as androidPackage.
Returns:
selenium driver
"""
app = self._u2.app_current()
print(app)
capabilities = {
'chromeOptions': {
'androidDeviceSerial': device_ip or self._u2.serial,
'androidPackage': package or app['package'],
'androidUseRunningApp': attach,
'androidProcess': process or app['package'],
'androidActivity': activity or app['activity'],
}
}
print(capabilities)
# self.kill_chromedriver()
time.sleep(2)
self._launch_webdriver()
dr = webdriver.Remote('http://localhost:%d' % self._port, capabilities)
# always quit driver when done
atexit.register(dr.quit)
return dr
driver = ChromeDriver(u2, log, common, phone_name).driver()
# 通过搜索来选择设备
search_input = common.wait_element(driver, (By.XPATH, Add_Device_Locator.search_classname_locator))
OK,我确认下
好的,我确认下。
冲在第一线,赞
这个问题有人解决了吗?
自己顶一下,没人帮忙看下吗
@codeskyblue 可以帮忙看下嘛?
坚持是一种美德。
我的理解是 app 控制设备都会走 mqtt 协议,举个栗子:你先订阅设备的 mqtt,然后 app 执行扫地机扫地操作按钮,等待 mqtt 的 notify 返回并断言即可