protected void LongPress(IWebElement element)
        {
            WaitForElement(element);
            TouchActions action = new TouchActions(DriverFactory.INSTANCE);

            action.LongPress(element);
            action.Release();
            action.Perform();
        }
Esempio n. 2
0
        protected void longPress(IWebElement element)
        {
            WaitForElement(element);
            //IWebElement iElement = driver.FindElement(element);

            TouchActions action = new TouchActions(DriverFactory.GetDriver());

            action.LongPress(element);
            action.Perform();
        }
Esempio n. 3
0
        public void DraggableItemsTest()
        {
            IWebElement DraggableItem = _driver.FindElement(By.XPath("//div[@id='todrag']/span"));

            IWebElement DropBox = _driver.FindElement(By.Id("mydropzone"));

            TouchActions drag = new TouchActions(_driver);

            drag.LongPress(DraggableItem)
            .MoveToElement(DropBox)
            .Release(DropBox)
            .Perform();

            System.Threading.Thread.Sleep(15000);

            _driver.FindElement(DroppedItemList).Text.Should().Contain("Draggable 1");
        }