我在使用Selenium中的操作时遇到错误,这是我的代码:
public class Actions_keys
{
WebDriver driver;
@Test
public void ebay() throws InterruptedException
{
System.setProperty("webdriver.gecko.driver", "C:\\Appium\\geckodriver.exe");
driver = new FirefoxDriver();
driver.get("http://www.bshari.tk/Account/Login");
Thread.sleep(5000);
Actions act = new Actions(driver);
WebElement ele= driver.findElement(By.id("Pk_UserId"));
// ele.sendKeys("qwe");
ele.click();
act.keyDown(Keys.SHIFT).sendKeys("qwerty").build().perform();
}
}
错误:
org.openqa.selenium.UnsupportedCommandException:POST / session / 2ef57730-2920-461f-9f99-be201bfcc9bd / keys不匹配 已知命令构建信息:版本:'未知',修订版:' 1969d75', 时间:' 2016-10-18 09:43:45 -0700'系统信息:主持人:' Revanth',ip: ' 192.168.1.11',os.name:' Windows 10',os.arch:' amd64',os.version: ' 10.0',java.version:' 1.8.0_111'司机信息: org.openqa.selenium.firefox.FirefoxDriver功能 [{MOZ:轮廓= C:\用户\瑞文\应用程序数据\本地\ TEMP \ rust_mozprofile.oYG6PBsXT6f9, rotate = false,timeouts = {implicit = 0,page load = 300000, script = 30000},pageLoadStrategy = normal,platform = ANY, specificationLevel = 0,moz:accessibilityChecks = false, acceptInsecureCerts = false,browserVersion = 52.0,platformVersion = 10.0, moz:processID = 2104,browserName = firefox,platformName = windows_nt}]
我不确定如何修复此错误,我们将非常感谢任何帮助。