Capybara: is it possible to get an attribute value from a css string?

后端 未结 3 1229
悲哀的现实
悲哀的现实 2020-12-14 16:17

If I\'ve got some HTML like:

I\'ve seen that I

3条回答
  •  生来不讨喜
    2020-12-14 16:32

    The only way I have been able to do this is with jQuery.

    href = page.evaluate_script("$('a.link_class').attr('href');")
    

提交回复
热议问题