有人成功使用 selenium-ide 将数据输入谷歌文档吗?如果没有还有其他选择吗?
我正在尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.