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.
在 Sahi 控制器中,这工作正常
_div({className:"/class.*/",id:"id"})
但是我在 sahi 下面尝试了 ruby,它总是返回 false。
@browser.div('{className:"/class.*/",id:"id"}').exists?
现在试试这个:
assert @browser.div(@browser.eval('({className:"class",id:"id"})')).exists
这将起作用。