Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
themeRDark
titleJava Code Example
public static void scrollDowntoXPath(String xPath, AppiumDriver driver) {
	boolean flag=true;
	int count=1;
    while(flag){
    	try {
	    	driver.findElement(By.xpath(xPath));
	    	flag=false;
	    	break;
    	}
    	catch(Exception NoSuchElementException) {
    		count=count+1;
	    	Map<String, Object> params = new HashMap<>();
	    	params.put("start","40%,90%");
	    	params.put("end","40%,20%");
	    	params.put("duration","2");
	    	Object res= driver.executeScript("mobile:touch:swipe",params);
    	if(count==5)
    	{
    		break;
    	}
    	}
    }
}

...

HTML
<iframe width

...

="560" height="315" src="https://www.youtube.com/embed/

...

1tO6xF2FM_8

...

" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Content by Label
showLabelsfalse
max5
spacesTT
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("swipe","selenium","scrollto","scroll","appium") and type = "page" and space = "TT"
labelsappium selenium scrollto scroll swipe

...