如何从ruby文件中对已打开的浏览器执行命令 [英] How do I execute a command on already opened browser from a ruby file
问题描述
我使用黄瓜框架来测试web应用程序,因为我开发我的脚本,我必须每次在我的代码添加东西后再次启动浏览器。我的问题是是否可能从已经打开的浏览器从ruby(.rb)文件执行命令。这将节省我很多时间。
I use cucumber framework for testing web application, as i develop my scripts i have to launch the browser again and again every time after adding something to my code. My question is "Is it possible to execute a command on already opened browser from a ruby(.rb ) file" ??. Which will save me a lot of time . My framework is based on cucumber, capybara and selenium webdriver.
感谢提前
推荐答案
不可能使用现有的Selenium webdriver浏览器。
但是,驱动程序(Capybara-Webkit,Poltergeist,Webdriver的HtmlUnitDriver)更快,启动时间比浏览器少。也许他们会对你有好处。
However, there drivers (Capybara-Webkit, Poltergeist, Webdriver's HtmlUnitDriver) that are faster and have less startup time than browsers. Maybe, they will be good for you.
这篇关于如何从ruby文件中对已打开的浏览器执行命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!