请问嵌入式被测对象都是硬件,怎么搭建软件自动化测试框架来做自动化测试?
请问嵌入式被测对象都是硬件,怎么搭建软件自动化测试框架来做自动化测试?
没有解决啊,是不是只能把微信给降级了?求助大神们!
现在又碰到一个新问题,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() 就会报错找不到对象。
请问:
好的,谢谢
android 手机手动打开 task manager,就是在 home 键的左边那个键,按一下显示后台运行的 app 啊
adb shell am force-stop com.sec.android.app.popupcalculator 可以强制退出 android 计算器 app,但是如何才能在后台 task manager 里面彻底把计算器的进程杀掉呢?我跑了 adb shell am kill com.sec.android.app.popupcalculator 以后,但是计算器进程仍然还在后台。
非常感谢,改了下手机默认输入法好了。。。
appium 脚本里面只是用 sendkey 来输入邮箱字符的,请问这个 adb shell input keyevent KEYCODE_AT 该加在代码的哪里起作用?
还有个问题关于 xpath,下面 2 个是否相同呢?
element1 = $driver.find_element(:xpath, "//[contains(@resource-id,'#{id}') and @text = '#{text}']/../")
element2 = $driver.find_element(:xpath, "//[contains(@resource-id,'#{id}') and @text = '#{text}']/preceding-sibling::[1]")