2012-03-02 102 views

回答

0

你沒有給出關於你的問題的很多細節,但是從你提供的這些稀缺信息中我得出結論,你正在做一些調皮的事情。

這是因爲在使用Cucumber編寫驗收或集成測試時,您應該不需要「檢查不在頁面上的鏈接」。

無論如何,你還沒有提到你使用的框架是Cucumber。假設你正在使用Capybara,你可以定義這樣的步驟:

And /^Invis is doing something naughty right now $/ do 
    @some_thing = SomeThing.first 
    visit hidden_link_with_anchor_path(@some_thing, :anchor => "foo") 
end 

希望有所幫助。