selenium java清空默认值方法

public ReleaseRequirePage setContactNumber(String phoneNum) {

  WebElement element=tp.xpathLocator(TradingHallLoc.acontactNumber);
  element.click();
  element.sendKeys(Keys.chord(Keys.CONTROL, "a"));//全选
  element.sendKeys(Keys.BACK_SPACE);//退格键删除
  element.sendKeys(phoneNum);
  return this;
}

上一篇:JS实现浏览器打印、打印预览


下一篇:QQ、微信消息轰炸