Exemplo n.º 1
0
        public static void ScrollMobile(IPerformsTouchActions driver, IWebElement element)
        {
            TouchAction touchAction = new TouchAction(driver);

            touchAction
            .MoveTo(element, 0, 0)
            .Perform();
        }
Exemplo n.º 2
0
		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();
        }
Exemplo n.º 7
0
        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();
        }
Exemplo n.º 9
0
        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();
        }
Exemplo n.º 10
0
 /// <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;
 }
Exemplo n.º 11
0
 /// <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;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Cancels the Touch Action
 /// </summary>
 public void Cancel()
 {
     this.TouchActionPerformer = null;
     steps.Clear();
 }
Exemplo n.º 13
0
 /// <summary>
 /// Cancels the Touch Action
 /// </summary>
 public void Cancel()
 {
     this.TouchActionPerformer = null;
     steps.Clear ();
 }
Exemplo n.º 14
0
 public TouchAction(IPerformsTouchActions touchActionPerformer)
 {
     this.TouchActionPerformer = touchActionPerformer;
 }
Exemplo n.º 15
0
 /// <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;
 }