A bug has not been resolved before.
Today, it's finally settled.
Question process:
App is a hybrid application, after the project has been H5 optimized, the previous use case execution always fails, reflected in the original one element click No feedback
Troubleshooting reasons: 1. The project was H5 optimized, 2. The code of the test was also optimized
2. After the project code changes, the original findby to find the element, the positioning of the element is always less than 0, will not change
3.findby is the element control information that is filled in at initialization time, and subsequent if no refresh may not change the positioning at all.
Workaround: After changing the positioning of the element, getpagesource the control information again.
while (Loginbutton.getlocation (). x<0) {System.out.println (Loginbutton.getlocation (). x);d River.getpagesource () ; Thread.Sleep (3000);}
Tips: If it's a native control, it can be crawled in Chrome's inspect, but it's still not working.
Appium switch Native/webview,findby, and page element positioning has been less than 0 of the problem of resolution