Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Drag and Drop through Web Driver

    • 0
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 302
    Comment on it

    here is the method for doing drag and drop operation on mozilla

    1. Create Driver for any Browser(Mozilla)
    2. Go to the URL
    3. Create an Action object for Driver
    4. Fetch and create WebElement object for the SOURCE element.
    5. Fetch and create WebElement object for the DESTINATION element.
      6.Perform ACTION.
      a.Click and Hold the source WebElement.
      b.Move to destination WebElement.
      c.Release the Element.

    Here is the code for handling drag and drop operation through web driver

    WebDriver driver = new FirefoxDriver();
    Actions act = new Actions(driver);
    WebElement src = driver.findElement(By.xpath("//div[@id='items']/div[1]"));
    WebElement des = driver.findElement("trash"));

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: