我正在使用calabash-ios进行自动化测试,并且在启动时将命令行参数传递给我的iOS应用程序是很困难的。我不是Ruby程序员,但通过查看源代码,我尝试将cmd行参数附加到应用程序路径。我在calabash-ios控制台中尝试了类似这样的操作:
start_test_server_in_background({:app => "#{ENV['APP']} -OverrideWebApp test/index.html"})其中“cmd /index.html”是我试图传递的-OverrideWebApp行参数。有没有什么特殊的键或者钩子可以用来将cmd行参数传递给我的应用程序?
发布于 2015-10-22 06:04:30
要将参数传递给应用程序,请使用:
options = {:args => ['-com.apple.CoreData.ConcurrencyDebug', '1']}
start_test_server_in_background(options)有关详细信息,请参阅:https://github.com/calabash/calabash-ios/issues/363
要点是传递一个逗号分隔的字符串列表。在您的案例中:
options = {:args => ["-OverrideWebApp", "test/index.html"]}https://stackoverflow.com/questions/33249737
复制相似问题