WebDriver action classes do not execute while inside an iframe within the Microsoft Edge browser

Issue #16424557 • Unassigned

Details

Author
Franco D.
Created
Mar 16, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

I am using Windows 10 Build 10586. I have installed Microsoft Edge WebDriver Release 10586

The following action classes do not get executed while inside an iframe within the Microsoft Edge browser:
action.dragAndDrop
action.doubleClick
action.contextClick
action.clickAndHold
action.moveToElement
action.release

Here are the sample programs where I’ve tried to execute these actions:

Program 1:

package trainingSeleniumAutomation;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.interactions.Actions;

public class ActionsClassEdge {

public static void main(String[] args) throws InterruptedException, AWTException {
    // TODO Auto-generated method stub

    //Initiate Browser
    System.setProperty("webdriver.edge.driver", "C:\\MicrosoftEdge\\MicrosoftWebDriver.exe");
    
    WebDriver driver = new EdgeDriver();
    driver.manage().window().maximize();
    
    Actions action = new Actions(driver);
    
    driver.get("https://jqueryui.com/droppable/");
    
    Thread.sleep(1000);
    
    driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
    
            
    driver.switchTo().frame(0);
    
    
    Thread.sleep(1000);
    
    
    WebElement drag=driver.findElement(By.xpath("//*[@id='draggable']"));
      
    
            WebElement drop=driver.findElement(By.xpath("//*[@id='droppable']"));
    
    
    Thread.sleep(1000);
    
        
    action.dragAndDrop(drag, drop).build().perform();
            
}

}

Program 2:

package trainingSeleniumAutomation;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.Collections;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.interactions.Actions;

public class ActionsClassEdge1a {

public static void main(String[] args) throws InterruptedException, AWTException {
    // TODO Auto-generated method stub

    //Initiate Browser
           System.setProperty("webdriver.edge.driver", "C:\\MicrosoftEdge\\MicrosoftWebDriver.exe");
    
    WebDriver driver = new EdgeDriver();
    driver.manage().window().maximize();
    
    Actions action = new Actions(driver);
    
    driver.get("https://jqueryui.com/droppable/");
    
    driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
    
    driver.switchTo().frame(0);
    
    WebElement drag = driver.findElement(By.id("draggable"));

    WebElement drop = driver.findElement(By.id("droppable"));
    
            
    action.doubleClick(drag);
    
    Thread.sleep(1000);
    
            
    action.contextClick(drop);
    
    
    Thread.sleep(1000);
    
    
            
    action.dragAndDrop(drag, drop).perform();
    
    
    
}

}

Program 3:

package trainingSeleniumAutomation;

import java.util.Collections;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.interactions.Actions;

public class ActionsClassEdge2a {

public static void main(String[] args) throws InterruptedException {
    // TODO Auto-generated method stub

    //Initiate Browser
            System.setProperty("webdriver.edge.driver", "C:\\MicrosoftEdge\\MicrosoftWebDriver.exe");
    
    WebDriver driver = new EdgeDriver();
    driver.manage().window().maximize();
    
    Actions action = new Actions(driver);
            
    driver.get("https://jqueryui.com/droppable/");
    
    driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
    
    driver.switchTo().frame(0);
    
    WebElement drag = driver.findElement(By.id("draggable"));

    WebElement drop = driver.findElement(By.id("droppable"));
    
    action.clickAndHold(drag).moveToElement(drop).release(drop).build().perform();
    
    //driver.quit();
    
    
}

}

Attachments

2 attachments

Comments and activity

Nothing to see here! No one has commented on this issue yet.

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

Sign in