1.selenium
/** * @author Young * @param locator * @param values * @throws Exception */ protected void typeQuick(Locator locator, String values) throws Exception { WebElement e = findElement(driver, locator); log.info("type value is: " + values); JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("arguments[0].value=""+values+""", e);
去掉只读属性
JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("arguments[0].removeAttribute("+"readonly"+")", e);
https://www.cnblogs.com/tobecrazy/p/4817946.html