如何从 Web 应用程序调用 watir 脚本?
我有一个 watir 脚本,我必须在调用脚本的同一个浏览器上从 Web 界面运行该脚本。是否可以?
I have a watir script ,that i have to run from a web interface, on the same browser invoking the scripts. Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是不可能的,因为浏览器不理解 ruby 是什么。
This isn't possible to do, as a browser doesn't understand what ruby is.
我相信这是可能的。我一直打算使用 PHP 开始一个与 adithi 想做的类似的项目。在 PHP 中,您可以使用 shell_exec 命令或反引号运算符在 shell 中执行命令。 ruby 使用 put 返回输出,PHP 可以读取该输出。
http://chipmunkninja.com/Program-Execution-in-PHP% 3A-exec-m@ 似乎是详细介绍此技术的一个很好的页面。
I believe that it is possible. I've been intending to begin a similar project to what adithi wanted to do at some point, using PHP. From PHP, you can use the shell_exec command or backtick operator to execute commands in the shell. The ruby returns output using puts, which can be read by the PHP.
http://chipmunkninja.com/Program-Execution-in-PHP%3A-exec-m@ seems to be a good page detailing this technique.