appium / python-client

Python language bindings for Appium
Apache License 2.0
1.62k stars 554 forks source link

How TouchAction to W3C actions implement partial refresh #988

Closed jepson66 closed 3 weeks ago

jepson66 commented 3 weeks ago

How to implement partial refresh using TouchAction to W3C actions? For example, I want to refresh to see if the text of a button changes.

KazuCocoa commented 3 weeks ago

I'm not sure what "refresh" means in this context, but links around https://github.com/appium/python-client?tab=readme-ov-file#quick-migration-guide-from-v3-to-v4 will help to check W3C actions.

KazuCocoa commented 3 weeks ago

https://discuss.appium.io/ would also help to ask general questions like how to do XXX.

jepson66 commented 3 weeks ago

@KazuCocoa Thank you for your answer.

  1. My scenario is like this. I have a button. When the countdown is completed, the button text will change. I want to re-obtain the changed text information of the button, so I need to refresh it. image
                    ||
    image
  2. If the element object captured before the countdown ends, after a period of time, even if the page does not change or the page is not switched, is the element object captured previously unusable? Unusable means that it cannot pass "outdated" "object to perform click and other operations. I have tried it. If I call it after a while, an error will be reported directly. I wonder if you have encountered it.
KazuCocoa commented 1 week ago

if the element state changes, usually you may need to get the element again. Or you could keep getting the text value. it would depend on the implementation though.