Questions tagged «sendkeys»

11
Selenium WebDriver:我想覆盖字段中的值,而不是使用Java使用sendKeys将其附加到该值
在WebDriver中,如果我使用sendKeys,它将把我的字符串附加到字段中已经存在的值上。我无法使用clear()方法清除它,因为第二次我这样做,网页将抛出一个错误,指出它必须介于10到100之间。所以我无法清除它,否则之前将引发错误我可以使用sendKeys来输入新值,如果我使用sendKeys,只需将其附加到已经存在的值上即可。 WebDriver中是否有任何内容可以让您覆盖字段中的值?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.