My current application downloads content from the internet and shows it to the user once the whole package is complete.
The snippet of code im looking at is:
//1 hour time limit
while (System.currentTimeMillis() - startTime < minutes) {
//Example … folder 1 : 20%
System.out.println(staticText.get(0).get(0).getText() + " : " + staticText.get(0).get(2).getText() );
//Example … folder 2 : 40%
System.out.println(staticText.get(1).get(0).getText() + " : " + staticText.get(1).get(2).getText() );
//Example folder 3 : 80%
System.out.println(staticText.get(2).get(0).getText() + " : " + staticText.get(2).get(2).getText() );
//when all three are 100% stop printing
if(staticText.get(0).get(2).getText().equals(“100%”) & staticText.get(1).get(2).getText() & staticText.get(2).get(2).getText().equals(“100%”)) {
break;
}
}
Console Shows this:
Folder 1: 0%
Folder 2: 14%
Folder 3: 100%
Folder 1: 0%
Folder 2: 15%
Folder 3: 100%
Folder 1: 0%
Folder 2: 15%
Folder 3: 100%
Folder 1: 0%
Folder 2: 16%
Folder 3: 100%
Folder 1: 0%
Folder 2: 17%
Folder 3: 100%
Folder 1: 0%
Folder 2: 17%
Folder 3: 100%
My Question is : How can I slow the appium server down in locating elements, without “sleeping” or “wait” and speed it back up once i break out of the loop. The download process takes about 30 minutes.