Coder Social home page Coder Social logo

Comments (14)

codeskyblue avatar codeskyblue commented on May 3, 2024

你这个不像企业证书啊。
设置环境变量 export DEBUG=true 可以看到具体的错误日志

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

好的,我试试去 这个export DEBUG=true,然后看看是什么错误,感谢大佬

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

@codeskyblue 大佬,你说的这个DEBUG=true是说我python里import wda 设置wda。DEBUG=true,还是这样,tidevcie xctest -B 。xctrunner --debug这样,下午又发现了一次崩溃,使用了启动命令后加--debug,打印的信息还是上面那个截图那样。

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

打开export DEBUG=ture,显示说dtxm socket closed
image

from taobao-iphone-device.

codeskyblue avatar codeskyblue commented on May 3, 2024

你看看有没有可能是执行了什么特定的代码,然后tievice就崩了

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

发现大多次崩溃是,使用了exists,然后接的又使用了exists,每次好像都会遍历一下当前页面所有信息,会不会因为这样,过多的遍历页面信息,然后崩溃?
每次都能有好几节这样的打印,每次打印的内容都很多。截屏截不全
image

from taobao-iphone-device.

electricbubble avatar electricbubble commented on May 3, 2024

@gffguo 你在用 WDA 获取 微信source ?

我有过很多次这么做, 大部分情况都导致 xctest 被强制中断

重启 微信 后, 会有较大概率成功, 但是依旧很慢且有被中断的可能

我觉得不一定是 tidevice 的问题

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

@electricbubble 对,主要现在我想确定一些,我这脚本写的哪些东西,导致了xctest中断,最终导致了tidevice崩溃
我那个是用wda的exists,判断一个元素是否在当前页面已经出现了,然后有一个方法里用了很多次
还有一个就是我们这个有登录和非登录的切换,有的时候切换的比较频繁,【qq登录】

from taobao-iphone-device.

electricbubble avatar electricbubble commented on May 3, 2024

exists 会遍历当前页面元素

但凡是涉及到 微信 的较多页面元素, 都有可能导致被强制中断

我目前的做法是, 提高 目标元素描述精准度

尽可能的使用更多 谓词 描述 目标元素

比如同时指定 元素坐标范围 控件类型

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

好的,我去试试

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

大佬们,可怜可怜孩子吧image
可以不可以再帮我分析一下,为什么还是会报错。。。我发现好像每次都会有这个 server request not handled
image

from taobao-iphone-device.

electricbubble avatar electricbubble commented on May 3, 2024

日志看上去是正常的 触发了 停止。。。

tidevice转发xctest 看上去都是正常的。。。

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

@electricbubble 好吧,我试了好多改我们代码,前一会有一次,是执行到facebook-wda里wait方法就wda退出了,wait等待一个登录弹窗出现,但是尝试了5次之后,又没事了。。。我还是再慢慢定位一下我们脚本哪搞的出问题了

from taobao-iphone-device.

gffguo avatar gffguo commented on May 3, 2024

我用tidevice 的wdaproxy方式执行wda【原因是失败可以自己重启】,和fackbook-wda的回调,暂时能勉强可以不会崩溃`
def device_offline_callback(client, err):
if isinstance(err, requests.ConnectionError):
print("Handle device offline")
ok = client.wait_ready(600) # 等待600s恢复
if not ok:
return wda.Callback.RET_ABORT
return wda.Callback.RET_RETRY

c.register_callback(wda.Callback.ERROR, device_offline_callback, try_first=True)`

from taobao-iphone-device.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.