For my e2e tests on iOS
, I'm running some appium
commands like the following examples:
browser.execute("mobile: scroll", {
element: elementId,
toVisible: true
});
or simply
browser.execute("mobile: scroll", {
direction: "up"
});
but I noticed that the scroll incredibly slow. Is there a way to increase the speed and gain time running my tests? I have already check out the documentation here but haven't found anything interesting.
Any clue ?
You could consider using mobile:swipe
command , it should be working much faster:
Map<String, Object> params = new HashMap<>();
params.put("direction", "up");
//if you are scrolling to some MobileElement
if (myElement != null) {
params.put("element", ((RemoteWebElement) myElement ).getId());
}
browser.executeScript("mobile: swipe", params);
There is also Swipe command available via SeeTest Appium Extension which is easier to use in terms of syntax
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.