ClickAndHold(Element) or MoveToElement(Element) doesn't work on EdgeWebDriver 14366.

Site Outreach Issue #7961568

Details

Author
Nick L.
Created
Jun 22, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

I can’t reopen Issue #7863474.
So I report a new issue for that.

Actions(EdgeWebDriver).ClickAndHold(onElement).MoveToElement(toElement).Release().Perform();

I have try it still can’t works for EdgeWebDriver.

I have try other functions:
1.public Actions DragAndDrop(IWebElement source, IWebElement target);

2.public Actions DragAndDropToOffset(IWebElement source, int offsetX, int offsetY);

They can’t work too. Could you have a look it?

Environment:
Windows 14367
WebDriver 14366

The function can work for InternetExplorerDriver, FirefoxDriver and ChromeDriver. Please see the attachment. Thanks~

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Ibrahim O.”

  • Thank you for the update. I have attached a sample ClickAndHoldSample.zip 
    Could you please firstly run your MicrosoftWebDriver.exe (https://www.microsoft.com/en-us/download/details.aspx?id=48740)
    Then run the JAR file from the attachment. Expected behaviour is WebDriver will launch a page that has drop down list and will select the items from item3 to item8 by using ClickAndHold method. If this generates any error messages please keep us posted we will be happy to assist you.

    All the best,
    The MS Edge Team

  • Hi Ibrahim,

    Where can I find this file ClickAndHoldSample.zip?
    I can’t find it on attachment.

    Thanks~

  • You should be able to see in the attachments section now.

  • Hi Ibrahim,

    Thanks for your help.
    I have try your sample. It works. But my environment is C# + Selenium WebDriver. It don’t work. Could you give me a sample with C#.

    Thanks~

  • Microsoft Edge Team

    Changed Status to “Site Outreach”

  • You have multiple options to do that. Here is the code I have used for testing, of course you can optimize it.

    IWebElement multiSelectDropDown = driver.FindElement(By.Name(“multiselectdropdown”));
                    IWebElement from = multiSelectDropDown.FindElements(By.TagName(“option”)).ElementAt(0);
                    IWebElement to = multiSelectDropDown.FindElements(By.TagName(“option”)).ElementAt(5);

                    Actions builder = new Actions(driver);
                    IAction doAction = builder.ClickAndHold(from).MoveToElement(to).Release(to).Build();
                    doAction.Perform();

    In the meantime I would suggest you to use the webdriver insider version from this link https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

    All the best,
    The MS Edge Team

      

You need to sign in to your Microsoft account to add a comment.

Sign in