Why do we need Actions class and what is the use of it if it is not used ever in the code.
Below is the code I took from other site.
public class SwitchFrames {
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/Frames.html");
Actions action = new Actions(driver);
driver.switchTo().frame(0);
WebElement txt = driver.findElement(By.name("1"));
txt.sendKeys("Frames Works");
driver.switchTo().defaultContent();
driver.switchTo().frame(1);
txt = driver.findElement(By.name("2"));
txt.sendKeys("Frames always works");
}
}