黄瓜/水豚

编程入门 行业动态 更新时间:2024-10-28 18:23:40
黄瓜/水豚 - 如何获取当前执行的主机和端口(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 = 31337

You can set port that will be used to spawn an application server

Capybara.server_port = 31337

更多推荐

本文发布于:2023-08-01 17:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1362058.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:黄瓜   水豚

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!