FAutoTest icon indicating copy to clipboard operation
FAutoTest copied to clipboard

可以增加支持企业微信么?

Open metoto opened this issue 7 years ago • 2 comments

目前有项目在使用企业微信的开发,但是今天试了一下还不能支持企业微信,这个是因为企业微信本身的问题么?

metoto avatar Oct 18 '18 12:10 metoto

补充一下,我是已经进入到了H5这个页面,但是还是提示没有检测到,但是我用chrome:inspect也能看到这个页面。是不是和X5协议有关啊?我访问localhost:9222/json, 不会报错,但是返回了一个空的[]。同样的网页在微信里是好的;

企业微信的进程是下面这个: WebView in com.tencent.wework (57.0.2987.132)

微信的进程是 com.tencent.mm (57.0.2987.132)

Error in sys.excepthook: Traceback (most recent call last): File "E:\FAutoTest-master\fastAutoTest\utils\vmhook.py", line 48, in _handleUncaughtException raise Exception(exctype) Exception: <type 'exceptions.RuntimeError'>

Original exception was: Traceback (most recent call last): File "E:/FAutoTest-master/sample/HYK_TestDemo.py", line 17, in h5Driver.initDriver() File "E:\FAutoTest-master\fastAutoTest\core\h5\h5Engine.py", line 70, in initDriver url = self._urlFetcher.fetchWebSocketDebugUrl() File "E:\FAutoTest-master\fastAutoTest\core\h5\h5WebSocketDebugUrlFetcher.py", line 37, in fetchWebSocketDebugUrl self._fetchInner() File "E:\FAutoTest-master\fastAutoTest\core\h5\h5WebSocketDebugUrlFetcher.py", line 55, in _fetchInner self._webSocketDebugUrl = self._fetchWebSocketDebugUrl(self._localForwardPort) File "E:\FAutoTest-master\fastAutoTest\core\h5\h5WebSocketDebugUrlFetcher.py", line 162, in _fetchWebSocketDebugUrl raise RuntimeError(errorMsg) RuntimeError: 在执行脚本前,先进入H5页面

Process finished with exit code 1

metoto avatar Oct 18 '18 13:10 metoto

可以,可以尝试按以下步骤进行修改即可使用:第一步,修改_ADB_FIND_STR_CMD里面获得指定App进程号的方法,如企业微信是com.tencent.wework等,其它类x5内核类似;第二步,修改fetchWeixinToolsProcessPid里面的方法,使其连接上你所要fetch上的上面获取的那个进程号即可。

Jaggerer avatar Oct 24 '18 10:10 Jaggerer