public static void ScrollMobile(IPerformsTouchActions driver, IWebElement element) { TouchAction touchAction = new TouchAction(driver); touchAction .MoveTo(element, 0, 0) .Perform(); }
public static ITouchAction Swipe(IPerformsTouchActions driver, int startX, int startY, int endX, int endY, int duration) { ITouchAction touchAction = new TouchAction(driver) .Press (startX, startY) .Wait (duration) .MoveTo (endX, endY) .Release (); return touchAction; }
public void Swipe(IPerformsTouchActions touchActionsPerformer, int startx, int starty, int endx, int endy, int duration) { TouchAction touchAction = new TouchAction(touchActionsPerformer); // appium converts Press-wait-MoveTo-Release to a swipe action touchAction.Press(startx, starty).Wait(duration) .MoveTo(endx, endy).Release(); touchAction.Perform(); }
public void Tap(IPerformsTouchActions multitouchPerformer, int fingers, IWebElement webElement) { MultiAction multiTouch = new MultiAction(multitouchPerformer); for (int i = 0; i < fingers; i++) { multiTouch.Add(new TouchAction(multitouchPerformer).Tap(webElement)); } multiTouch.Perform(); }
public void Tapxy(IPerformsTouchActions multitouchPerformer, int fingers, int x, int y) { MultiAction multiTouch = new MultiAction(multitouchPerformer); for (int i = 0; i < fingers; i++) { multiTouch.Add(new TouchAction(multitouchPerformer).Tap(x, y)); } multiTouch.Perform(); }
public void CheckTap(IPerformsTouchActions performer) { TouchAction t = new TouchAction(performer); t.Tap(accessibility); t.Perform(); MultiAction m = new MultiAction(performer); m.Add(new TouchAction(performer).Tap(customView)); m.Add(new TouchAction(performer).Tap(clickable)); m.Perform(); }
public static ITouchAction Swipe(IPerformsTouchActions driver, int startX, int startY, int endX, int endY, int duration) { ITouchAction touchAction = new TouchAction(driver) .Press(startX, startY) .Wait(duration) .MoveTo(endX, endY) .Release(); return(touchAction); }
public void CheckTap(IPerformsTouchActions performer) { TouchAction t = new TouchAction(performer); t.Tap(accessibility); t.Perform(); MultiAction m = new MultiAction(performer); m.Add(new TouchAction().Tap(customView)); m.Add(new TouchAction(performer).Tap(clickable)); m.Perform(); }
public void CheckTap(IPerformsTouchActions performer) { var t = new TouchAction(performer); t.Tap(_accessibility); t.Perform(); var m = new MultiAction(performer); m.Add(new TouchAction(performer).Tap(_customView)); m.Add(new TouchAction(performer).Tap(_clickable)); m.Perform(); }
/// <summary> /// Initializes a new instance of the <see cref="MultiTouchAction"/> class. /// </summary> /// <param name="driver">The <see cref="IWebDriver"/> the driver to be used.</param> public MultiAction(IPerformsTouchActions touchActionPerformer) { this.TouchActionPerformer = touchActionPerformer; }
/// <summary> /// Initializes a new instance of the <see cref="MultiTouchAction"/> class. /// </summary> /// <param name="driver">The <see cref="IWebDriver"/> the driver to be used.</param> /// <param name="element">The <see cref="IWebDriver"/> the element on which the actions built will be performed.</param> public MultiAction(IPerformsTouchActions touchActionPerformer, IWebElement element) : this(touchActionPerformer) { this.element = element; }
/// <summary> /// Cancels the Touch Action /// </summary> public void Cancel() { this.TouchActionPerformer = null; steps.Clear(); }
/// <summary> /// Cancels the Touch Action /// </summary> public void Cancel() { this.TouchActionPerformer = null; steps.Clear (); }
public TouchAction(IPerformsTouchActions touchActionPerformer) { this.TouchActionPerformer = touchActionPerformer; }