Commit 8cfef6b0 authored by YuShijiaCode's avatar YuShijiaCode

update method

parent d32c7cff
......@@ -34,6 +34,9 @@ exports.inputWithClear = async function (driver, xpath, value) {
// await driver.findElement(By.xpath(xpath)).clear();
await driver.findElement(By.xpath(xpath)).sendKeys(Key.COMMAND, "a")
await driver.findElement(By.xpath(xpath)).sendKeys(Key.DELETE)
await driver.findElement(By.xpath(xpath)).sendKeys(Key.CONTROL, "a")
await driver.findElement(By.xpath(xpath)).sendKeys(Key.DELETE)
// input new values into element
await driver.findElement(By.xpath(xpath)).sendKeys(value);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment