openatx / uiautomator2

Android Uiautomator2 Python Wrapper
MIT License
6.54k stars 1.4k forks source link

minicap使用问题 #542

Closed Anry-Hu closed 4 years ago

Anry-Hu commented 4 years ago

我想使用minicap的功能,于是写了如下代码:

import asyncio
import websockets

async def hello():
    uri = "ws://127.0.0.1:7912/minicap"
    async with websockets.connect(uri) as websocket:
        for i in range(10):
            greeting = await websocket.recv()
            print(f"< {greeting}")

asyncio.get_event_loop().run_until_complete(hello())

结果如图所示。 image

请问这个问题如何解决?

mingyuan-xia commented 4 years ago

你要给minicap发指令啊,否则他response 什么