2
我正在關注一個基於視圖的類模型來爲我的應用程序設置一個Calabash測試框架,即每個視圖都有一個包含該視圖的必要方法的類。如何在使用基於視圖的類模型時調用通用的Calabash方法?
但是,當我打電話蠡功能,如「wait_for()」,它引發我一個錯誤:
undefined method `wait_for' for LoggedInPage:Class (NoMethodError)
我已經在我的env.rb添加這些
require 'calabash-cucumber/wait_helpers'
require 'calabash-cucumber/operations'
World(Calabash::Cucumber::Operations)
World(Calabash::Cucumber::WaitHelpers)
alannichols是正確的,除了約定是使用'page(MyPage)'創建'Calabash :: IBase'的子類的新實例。這裏是一個示例項目的鏈接:https://github.com/calabash/ios-webview-test-app – jmoody 2015-04-07 11:44:49