0
HTML代碼硒的webdriver的SendKeys()不工作王氏oncopy,onpaste JavaScript事件
<input type="text" class="input-txt" data-bind="value: Email,qtipValMessage:Email" id="txtEmail" maxlength="160" oncopy="return false" onpaste="return false" title="Please enter the Email" data-orig-title="">
我的Java代碼
WebElement email = driver.findElement(By.id("txtEmail"));
new Actions(driver).moveToElement(email).perform();
email.clear();
email.sendKeys("[email protected]");
在執行我的代碼,它提供一個錯誤信息「元素目前相互作用並且可能不會被操縱「
因爲html代碼映射爲」oncopy「和」onpaste「標籤(返回false),所以sendKeys()在執行過程中失敗
請幫忙我們怎麼通過這個字段的值