黄瓜/水豚 - 如何获取当前执行的主机和端口(Cucumber / Capybara — how to get the host and port of the current execution)
我需要使用Open :: URI从我的应用程序下载一个csv文件,并且我需要给它一个完全限定的URI。 那么在黄瓜脚本中获得HOST和更重要的PORT的最佳方式是什么?
注意我正在使用水豚和硒
I need to download a csv file from my app using Open::URI and to do that I need to give it a fully qualified URI. So whats the best way to get the HOST and more importantly PORT in my cucumber script?
Note I am using Capybara and Selenium
最满意答案
您可以设置将用于生成应用程序服务器的端口
Capybara.server_port = 31337You can set port that will be used to spawn an application server
Capybara.server_port = 31337更多推荐
发布评论