You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a page in the iOS app I am testing where it displays a list of items that it receives from a backend server. I am using driver.getPageSource() to know when the page is done loading on the phone's screen and if a scroll down action is performed, the bottom of the scroll view has been reached. When I call driver.getPageSource(), Appium takes a really long time to load the page source, sometimes up to 30 seconds. Any other suggestions/method to accomplish these tasks?
Environment
Appium version (or git revision) that exhibits the issue: v1.16.0
Desktop OS/version used to run Appium: Mac OS Catalina v10.15.3
Node.js version (unless using Appium.app|exe): v13.7.0
Npm or Yarn package manager: v6.13.7
Mobile platform/version under test: iOS v13.3.1
Real device or emulator/simulator: Real device
Appium CLI or Appium.app|exe: Appium CLI
Code To Reproduce Issue [ Good To Have ]
public static void waitForPageToLoad() {
//Variables
String originalPageSource = "";
String newPageSource = getPageSource();
while (!originalPageSource.equals(newPageSource)) {
originalPageSource = newPageSource;
newPageSource = driver.getPageSource();
}
}
private static MobileElement scrollToElement(MobileElement element) {
//Variables
boolean isElementVisible = false;
String newPageSource = "";
String originalPageSource;
boolean reachedBottomOfPage = false;
newPageSource = getPageSource();
while (!isElementVisible && !reachedBottomOfPage) {
//Check if the element is visible
...
/* code to check if the element is visible */
...
//If the element isn't visible, scroll down the page
if (!isElementVisible) {
originalPageSource = newPageSource;
scrollDown();
newPageSource = driver.getPageSource();
reachedBottomOfPage = (originalPageSource.equals(newPageSource));
if (isResultsRecordingEnabled) {
enableRecordingResults();
}
}
}
return element;
}
The text was updated successfully, but these errors were encountered:
The problem
There is a page in the iOS app I am testing where it displays a list of items that it receives from a backend server. I am using driver.getPageSource() to know when the page is done loading on the phone's screen and if a scroll down action is performed, the bottom of the scroll view has been reached. When I call driver.getPageSource(), Appium takes a really long time to load the page source, sometimes up to 30 seconds. Any other suggestions/method to accomplish these tasks?
Environment
Code To Reproduce Issue [ Good To Have ]
The text was updated successfully, but these errors were encountered: