Alfred Huang
Alfred Huang
I met the problem when I did refactoring work on it, it helps much, and as a conclusion, I post the usage guide as below: 1. If a type is...
So the problem is solved now, the issue is ok to be closed.
@wj-Mcat local importing is ok, but it seems that the pylint check will fail. So I think the first choice is to import it at the top first, without putting...
The procedure which uses this class is inside the function `Wechaty.init_puppet_event_bridge`: 1. in `friendship_listener`, we call `self.Friendship.load(payload.friendship_id)` to instanciate a `Friendship` object, now the newly created `Friendship` object has no...
The outer procedure is well, but inside the `Friendship` class there are some issues. For the first one: The `@property payload` is not garanteed to be not None, so the...
In order to make it pass, I have to change the line as below: ``` if not self.payload: raise Exception('payload not ready ...') contact = self.wechaty.Contact.load(self.payload.contact_id) ``` Adding a verbosing...
In fact, we want all actions which requires `_payload` exists should work on a `payload` which has a type garanteed to be not None. So every time we access the...
So after all, @wj-Mcat, I want to know whether this pattern is a good practise, if it do, we can refactor all classes with payload in this way. Or further,...
I did not see the above information when I clone the repo, with: ``` git clone https://github.com/wechaty/python-wechaty ``` So is the problem still exist? Or how to reproduce the case?
如图,蓝色框即为实际选中的 scrollable 控件。 实际调用代码是这样的: ``` el = d(resourceId='xxxx:id/rv', scrollable=True) print(el.exists, el.count) result = el.scroll.forward(steps=10, max_swipes=1000) ``` 开始发现向后划(backward)是有效果的,但是向前滑没效果。 后来排查原因,在开发者选项中打开了“指针位置”,发现只要是 forward,滑动的开始点就必然在蓝框底部,这样会造成手势的起始点落在了被遮盖的页脚栏上,最终导致滚动无效。 然后翻查了一下 API,发现实现的 jsonrpc 中,并没有太多可以定制的余地。 如果框架不改,如何实现这一个操作? 或者说能否从框架层面自动判别解决这种被遮挡的情况?