site_prism是否允许使用CSS以外的其他选择器? [英] Does site_prism allow using other selectors than CSS?

查看:78
本文介绍了site_prism是否允许使用CSS以外的其他选择器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究允许我在水豚上使用Page Object Pattern的宝石。我发现site_prism,看起来很有希望。

I'm researching gems that allow me to use Page Object Pattern along Capybara. I found out site_prism and looks very promising.

我的问题是,有没有一种方法可以使用CSS以外的选择器来定义元素?像Xpath,Dom一样,也许只是元素的ID,等等。

My question is, is there a way to define elements with selectors other than css? Like Xpath, Dom, maybe just the id's of the elements, etc.

感谢和问候!

推荐答案

更新::从SitePrism 2.1开始,可以使用XPath表达式查找元素和节以及CSS选择器。

UPDATE: It is possible, as of SitePrism 2.1 to use XPath expressions to find elements and sections, as well as CSS selectors.

====

目前仅CSS。我将来可能会改变它。

CSS only at the moment. I may change that in the future though.

这篇关于site_prism是否允许使用CSS以外的其他选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆