Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public class DragDrop {
  2.  
  3. @Keyword
  4.  
  5. def dragdrop(TestObject to,TestObject destination,Integer intX,Integer intY) {
  6. def eleto = MobileElementCommonHelper.findElement(to, timeout)
  7. def eledest = MobileElementCommonHelper.findElement(destination, timeout)
  8. WebDriver driver = DriverFactory.getWebDriver()
  9. Actions build = new Actions(driver)
  10. action.moveToElement(eleto);
  11. action.pause(Duration.ofSeconds(3));
  12. action.clickAndHold(eleto);
  13. action.moveByOffset(1, 0);
  14. action.moveToElement(eledest,intX,intY);
  15. // action.moveByOffset(40, 0);
  16. // .pause(Duration.ofSeconds(5));
  17. .release().perform();
  18.  
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement