import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.InputEvent;
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.Actions;
public class selenium_keyboard_action {
/*Keys类提供了键盘的相关方法,sendKeys模拟键盘输入,可以输入键盘上的按键,也可以模拟组合键*/
WebDriver driver=new FirefoxDriver();
Actions action=new Actions(driver);
public static void main(String[] args) throws Exception {
selenium_keyboard_action ska=new selenium_keyboard_action();
ska.init();
import java.awt.Robot;
import java.awt.event.InputEvent;
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.Actions;
public class selenium_keyboard_action {
/*Keys类提供了键盘的相关方法,sendKeys模拟键盘输入,可以输入键盘上的按键,也可以模拟组合键*/
WebDriver driver=new FirefoxDriver();
Actions action=new Actions(driver);
public static void main(String[] args) throws Exception {
selenium_keyboard_action ska=new selenium_keyboard_action();
ska.init();