请问嵌入式被测对象都是硬件,怎么搭建软件自动化测试框架来做自动化测试?
请问嵌入式被测对象都是硬件,怎么搭建软件自动化测试框架来做自动化测试?
没有解决啊,是不是只能把微信给降级了?求助大神们!
现在又碰到一个新问题,chrome://inspect/#devices 得到小程序的 chrome 版本是:com.tencent.mm (67.0.3396.87),然后用了匹配的 v2.41 版本的 chromedriver,跑 appium log 显示得到的 chrome 版本是:[Chromedriver][39m Webview version: 'Chrome/68.0.3440.91',然后切换 context 报错如下:
[debug] [35m[MJSONWP][39m Matched JSONWP error code 13 to UnknownError
[error] [35m[Chromedriver][39m Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages
[error] [35m[Chromedriver][39m (Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.13.6 x86_64)
[error] [35m[Chromedriver][39m at Object.wrappedLogger.errorAndThrow (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-support/lib/logging.js:78:13)
[error] [35m[Chromedriver][39m at /Applications/Appium.app/Contents/Resources/app/node_modules/appium-chromedriver/lib/chromedriver.js:478:13[debug] [35m[Chromedriver][39m Webview version: 'Chrome/68.0.3440.91'[debug] [35m[JSONWP Proxy][39m Got response with status 200: {"sessionId":"4fda399fbf44d625f79b2dbb46f04819","status":13,"value":{"message":"unknown error: unable to discover open pages\n (Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.13.6 x86_64)"}}
[warn] [35m[JSONWP Proxy][39m Got an unexpected response: {"sessionId":"4fda399fbf44d625f79b2dbb46f04819","status":13,"value":{"message":"unknown error: unable to discover open pages\n (Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.13.6 x86_64)"}}
@xiaohengdada 你好,我按照你说的从搜一搜入口进入小程序,切换到 WEBVIEW_com.tencent.mm:tools 以后, body 里面是空的,然后我运行 driver.window_handles 来打印所有句柄,可是报错如下:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: 404 - "unknown command: session/b4c871631fc8b03bd53d7de34e69b789/window/handles"
你好,以美团外卖小程序为例,如果在 NATIVE_APP 情况下 (不切换 webview 进入小程序反而可以识别对象),用 driver.find_element_by_xpath("//*[contains(@content-desc,'美食')]").click() 可以发现对象并点击。
但是如果在进入小程序后,切换到 WEBVIEW_com.tencent.mm:appbrand1(我觉得应该是切换成功的 appium log: [debug] [Chromedriver] Changed state to 'online'),用 chrome://inspect/#devices 得到 “美食” 的 xpath,然后
driver.find_element_by_xpath("/html/body/wx-view/wx-view/wx-swiper[1]/div/div[1]/div/wx-swiper-item[1]/wx-view[1]").click() 就会报错找不到对象。
请问: