Selenium 鼠标悬停在IE 10中无法使用webdriver需要单击多个子菜单
需要先将鼠标悬停在菜单>菜单>子菜单1,然后再>子菜单1,然后再>子菜单1 > System.setProperty(“webdriver.ie.driver”,“E:\workplace\AutomationTemplateWrking1\src\resource\IEDriverServer.exe”) 解决方案:Selenium 鼠标悬停在IE 10中无法使用webdriver需要单击多个子菜单,selenium,internet-explorer,selenium-webdriver,automated-tests,ui-automation,Selenium,Internet Explorer,Selenium Webdriver,Automated Tests,Ui Automation,需要先将鼠标悬停在菜单>菜单>子菜单1,然后再>子菜单1,然后再>子菜单1 > System.setProperty(“webdriver.ie.driver”,“E:\workplace\AutomationTemplateWrking1\src\resource\IEDriverServer.exe”) 解决方案: 对我来说,它与64位版本的IEDriverServer一起工作。我用“true”添加了属性requireWindowFocus值:但无法在鼠标上方执行错误:stacktrace信
对我来说,它与64位版本的IEDriverServer一起工作。我用“true”添加了属性requireWindowFocus值:但无法在鼠标上方执行错误:stacktrace信息不可用我尝试了各种可能的方法,所有功能设置和IE设置都是iFrame中的元素?没有正常的html测试,这些测试在不同的浏览器中都能正常工作gud它的网站可以手动工作吗?是的,工作正常。@marwaha
WebDriver driver = new InternetExplorerDriver();
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.get("example.com/");
driver.findElement(By.id("user_login")).sendKeys("pmtest");
driver.findElement(By.id("user_password")).sendKeys("@123");
driver.findElement(By.className("login-button")).click();
driver.manage().window().maximize();
WebElement ele1=driver.findElement(By.id("menu"));
WebElement ele2=driver.findElement(By.xpath("//div[@class='head-fixed']/div/div/div/ul/li/ul/li/a[text()='Administration']"));
WebElement ele3=driver.findElement(By.xpath("(//a[text()='Charge Codes'])[1]"));
WebElement ele4=driver.findElement(By.xpath("(//a[text()='Charge Codes'])[2]"));
Actions a1 = new Actions(driver);
a1.moveToElement(ele1).build().perform();
Thread.sleep(1000);
a1.moveToElement(ele2).build().perform();
Thread.sleep(1000);
a1.moveToElement(ele3).build().perform();
Thread.sleep(1000);
ele4.click();