openatx / facebook-wda

Facebook WebDriverAgent Python Client Library (not official)
MIT License
1.71k stars 266 forks source link

Add get_clipboard function. #133

Open NoneTypeCoder opened 1 year ago

NoneTypeCoder commented 1 year ago

wda提供的getPasteboard并不是完全不能用,而是需要将手机上安装的wda设置为foreground时才能生效,也就是点击一下wda的app让它成为当前的app。所以代码里通过app_launch来将wda设置为foreground,获取剪切板内容后,再切换回原来的app。 image