【发布时间】:2020-02-25 15:05:06
【问题描述】:
我想使用 selenium 将多行字符串发送到输入字段。该字符串可能有多行(超过 100 行)。字符串示例如下:
String text = "this is line1\nthis is line2\n ......\nthis is line100";
我尝试使用 sendKeys(text) 在表单的输入文本框中输入字符串,但它正在逐行输入文本。
webElement.sendKeys(text);
在输入框中输入文本花费了太多时间。 有没有办法在 selenium 中一次发送多行字符串?
【问题讨论】:
标签: selenium selenium-webdriver