Comment #12 on issue 6468 by
maheshk...@gmail.com: moveToElement() method
Hi Friends..
moveToElement is not working in my FF 35.0.1 and selenium 2.44.0 below is
the code Colud any one please help on this
package com.selenium.training;
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.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.Test;
public class action1 {
public static WebDriver driver;
public action1()
{
driver=new FirefoxDriver();
}
@Test
public void facebook()
{
driver.navigate().to("
https://facebook.com");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(5000,TimeUnit.SECONDS);
WebElement username=driver.findElement(By.id("email"));
System.out.println(username.getSize());
//username.sendKeys("Mahesh");
Actions builder=new Actions(driver);
builder.moveToElement(username,150,22);
builder.sendKeys("Mahesh");
builder.perform();
Action
seriesofactions=builder.moveToElement(username).click().keyDown(username,Keys.SHIFT).sendKeys(username,"hell").keyUp(username,Keys.SHIFT).doubleClick(username).contextClick(username).build();
seriesofactions.perform();