Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的页面上有 Twitter-Bootstrap 的选项卡窗格。如何使用 Capybara 进行测试,以获取“/pages/1#some_tab”之类的页面,“some_tab”选项卡窗格正在打开?
page.has_selector?('div', :text => 'something in my tab', :visible => true)
关键是添加 visible => true 选项。