标签:元素 web drive exec view sleep lang thread pretty
方法一:
WebElement element = driver.findElement(By.id("id_of_element")); ((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element); Thread.sleep(500);
方法二:
WebElement element = driver.findElement(By.id("my-id"));
Actions actions = new Actions(driver);
actions.moveToElement(element);
actions.perform();
标签:元素 web drive exec view sleep lang thread pretty
原文地址:http://www.cnblogs.com/jxldjsn/p/7376349.html