有人成功使用 selenium-ide 将数据输入谷歌文档吗?如果没有还有其他选择吗?

发布于 2024-09-25 09:03:53 字数 79 浏览 1 评论 0原文

我正在尝试使用 selenium 将数据输入谷歌文档,以便其他 selenium 脚本可以访问它。如果没有,有人能想出一种方法来实现这一目标吗?

I am trying to use selenium to enter data into google docs so that it is accessible to other selenium scripts. If not can anybody think of a way to accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

大姐,你呐 2024-10-02 09:03:53

Selenium 的内容可编辑区域可能有点不稳定,因为 Selenium 在页面上“键入”的方式以及浏览器与页面的实际交互方式。

我建议使用 JavaScript 将文本插入到元素中,然后进行操作。

如果您想要更真实的感觉,那么我建议您转向 Selenium 2,因为击键更加符合操作系统本机。遗憾的是,这在 IDE 中不起作用,您必须使用 Python、Java、.NET 或 Ruby 才能利用它。

Selenium can be a little flaky with contentEditable areas because the way that Selenium "types" onto the page and how browsers really interact with that.

I would recommend inserting the text into the element with JavaScript and then doing the manipulations.

If you want a truer sense then I would recommend moving to Selenium 2 as the keystrokes are more OS native. This unfortunately does not work in the IDE and you will have to use Python, Java, .NET or Ruby to take advantage of it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文