Skip to content

.Net Standard implementation for proper Selenium Drag and Drop Functionality

Notifications You must be signed in to change notification settings

simplytest/selenium-dragdrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NuGet

selenium-dragdrop

.Net Standard implementation for proper Selenium Drag and Drop Functionality

Documentation

This project provides a .NET Standard library for automation of Selenium drag &d rop operations based on javascript routines, because the default Selenium Actions Drag&Drop won't unfortunately work for the msot HTML 5 sited.

Usage example:

    IWebDriver driver = new ChromeDriver(Environment.CurrentDirectory);
    try
    {
        driver.Navigate().GoToUrl("https://www.w3schools.com/html/html5_draganddrop.asp");

        IWebElement sourceEl = driver.FindElement(By.Id("drag1"));
        IWebElement targetEl = driver.FindElement(By.Id("div2"));

        SeleniumDragDrop.DragDropHelper dragdrop = new SeleniumDragDrop.DragDropHelper(driver);
        dragdrop.DragAndDrop(sourceEl, targetEl);

        Assert.IsNotNull(targetEl.FindElement(By.Id("drag1")));
    }
    finally
    {
        driver.Quit();
    }

Try it out and enjoy, your SimplyTest team.

License

MIT

About

.Net Standard implementation for proper Selenium Drag and Drop Functionality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published