在selenium ide中存储html源或变量内容?
我正在尝试在 selenium ide 中构建一个宏,将页面源存储到文件中。我看到有一个命令 storeHtmlSource() 将页面源存储到变量,但我不知道如何将变量的内容存储到文件。有没有一些直接的方法可以做到这一点,或者我需要以某种方式让它执行 javascript 来做到这一点?
如果这还不是很明显的话,我对硒是完全陌生的,但我已经浏览了文档一段时间,但还没有弄清楚。
I am trying to build a macro in selenium ide that stores the page source to a file. I see there is a command storeHtmlSource() that stores the page source to a variable, but I can't figure out how to store the contents of the variable to a file. Is there some direct way to do this or do I need to somehow have it execute javascript to do that?
I am totally new to selenium if that was not already obvious, but I have looked around the docs for a while and haven't figured it out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,您无法使用 Selenium IDE 执行此操作。 IDE 并没有被设计来做这样的事情,因为 Selenium Rc 可以让你做 IDE 可以做的事情,甚至更多,因为你使用你最喜欢的语言与代理对话,然后使用该语言的能力将东西写入代理。磁盘。
该 IDE 旨在帮助您通过记录功能获取测试用例的框架,然后对其进行调整、重播以查看其工作原理,然后导出到您喜欢的语言
Unfortunately you can not do this with Selenium IDE. The IDE has not been designed to do things like this since there is Selenium Rc that allows you to do what the IDE can do and more since you use your favourite language to speak to a proxy and then use that language's ability to write things to the disk.
The IDE is designed to help you get the skeleton of a test case with the record function, you then tweak it, replay to see it works and then export to your favourite language