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.
我正在研究允许我沿 Capybara 使用页面对象模式的宝石。我发现了 site_prism 并且看起来很有希望。
我的问题是,有没有办法用 CSS 以外的选择器定义元素?像 Xpath、Dom,也许只是元素的 id 等等。
谢谢并恭祝安康!
更新:从 SitePrism 2.1 开始,可以使用 XPath 表达式来查找元素和部分,以及 CSS 选择器。
=====
目前只有 CSS。不过,我将来可能会改变这一点。