AirtestProject / AirtestProject/AirtestIDE
shell命令报错
- Dominant language
- No language data
- Stars
- 236
- Forks
- 40
- PR merge metrics
- PR metrics pending
Description
(请尽量按照下面提示内容填写,有助于我们快速定位和解决问题,感谢配合。**否则直接关闭。**)
**(重要!根据问题类型选择分类)**
* 图像识别相关问题 -> https://github.com/AirtestProject/Airtest/issues
* 控件识别、树状结构、poco库报错 -> https://github.com/AirtestProject/Poco/issues
* 测试开发环境AirtestIDE使用问题(本软件) -> 本页面
**详细描述问题bug:**
bug描述
PACKAGE_NAME = "com.game.longjie"
shell("ps | grep "+PACKAGE_NAME+" | awk '{print $9}'") awk命令失败
错误提示:/system/bin/sh: awk: not found 在其他设备(OPPO)运行正常
**复现步骤:**
1.连接设备
2.运行上述命令
**python 版本:** `python3.9`
**操作系统:** `Windows11 64bit`
**手机设备信息:**
- 手机型号:vivo z1 青春版
- Android系统版本号: [e.g. Android 8.1]
- (别的信息)
**其他相关信息补充**
(例如在linux ubuntu16.04上运行异常,在windows上正常等信息。)
- AirtestIDE版本号:1.2.15
**截屏**
强烈建议带上截图,包括IDE本身的截图和后面的黑窗口的报错信息的截图(尽量完整)。
Traceback (most recent call last):
File "airtest\cli\runner.py", line 75, in runTest
File "site-packages\six.py", line 703, in reraise
File "airtest\cli\runner.py", line 72, in runTest
File "C:\Users\Administrator\Desktop\bat\jngjrcs_test.air\jngjrcs_test.py", line 158, in
myfun()
File "C:\Users\Administrator\Desktop\bat\jngjrcs_test.air\jngjrcs_test.py", line 146, in myfun
zzyx = shell("ps | grep "+PACKAGE_NAME+" | awk '{print $9}'")
File "airtest\utils\logwraper.py", line 124, in wrapper
File "airtest\core\api.py", line 178, in shell
File "airtest\core\android\android.py", line 436, in shell
File "airtest\core\android\adb.py", line 376, in shell
airtest.core.error.AdbShellError: stdout[b''] stderr[b'/system/bin/sh: awk: not found\r\n']
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.