@@ -72,6 +72,7 @@ driver.executeScript("gesture: swipe", Map.of("elementId", scrollView.getId(),
7272
7373# scrollElementIntoView
7474
75+ ** JAVA**
7576``` java
7677RemoteWebElement scrollView = (RemoteWebElement ) wait. until(presenceOfElementLocated(AppiumBy . accessibilityId(" Swipe-screen" )));
7778
@@ -83,17 +84,35 @@ driver.executeScript("gesture: scrollElementIntoView", Map.of("scrollableView",
8384 " maxCount" , 3 ));
8485
8586```
87+ ** PYTHON**
88+ ``` python
89+ list_view = driver.find_element(by = AppiumBy.ID , value = ' android:id/list' )
90+ driver.execute_script(' gesture: scrollElementIntoView' ,
91+ {' scrollableView' : list_view.id, ' strategy' : ' accessibility id' , ' selector' : ' Picker' ,
92+ ' percentage' : 50 , ' direction' : ' up' , ' maxCount' : 3 })
93+ ```
8694
8795Sample app used to demonstrate below gesture is available [ here] ( https://github.com/AppiumTestDistribution/appium-demo/blob/main/VodQA.apk )
8896
8997# Drag and Drop
9098
99+ ** JAVA**
91100``` java
92101RemoteWebElement source = (RemoteWebElement ) wait. until(elementToBeClickable(AppiumBy . accessibilityId(" dragMe" )));
93102RemoteWebElement destination = (RemoteWebElement ) wait. until(elementToBeClickable(AppiumBy . accessibilityId(" dropzone" )));
94103
95104driver. executeScript(" gesture: dragAndDrop" , Map . of(" sourceId" , source. getId(), " destinationId" , destination. getId()));
96105```
106+ ** PYTHON**
107+ ``` python
108+ el1 = driver.find_element(by = AppiumBy.ID , value = ' io.appium.android.apis:id/drag_dot_1' )
109+ el2 = driver.find_element(by = AppiumBy.ID , value = ' io.appium.android.apis:id/drag_dot_2' )
110+
111+ driver.execute_script(' gesture: dragAndDrop' , {
112+ ' sourceId' : el1.id,
113+ ' destinationId' : el2.id,
114+ })
115+ ```
97116
98117# Double Tap
99118
0 commit comments