![](/img/trans.png)
[英]Unable to Upload File using send_keys in Selenium Webdriver
[英]Send keys in selenium webdriver with javascript
我似乎无法使用 sendKeys 函数。 我正在使用 selenium webdriver 和 js 来发送密钥。 任何帮助,将不胜感激。
it("Apply text input", async function() {
await dashboardPage.run();
let inputs = await dashboardPage.componentsByClass('ace-content');
// identify the Element to put text into
for (let i in inputs){
console.log(await results[i].sendKeys("https://www.google.com",Key.RETURN); }
await driver.sleep(4000);
});
删除console.log
。 发送密钥两次。
element.sendKeys("https://www.google.com")
element.sendKeys(driver.Key.ENTER)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.