用于Capybara Ajax测试的xpath

I've got a anchor href value that will be set with ajax. What is the syntax to make this work for an ajax call? I.e., I need to wait not for the find to find the anchor, but when the anchor has a href that is not '#'. I.e., how can I put the begins with match in the expath query?

expect(find(:xpath, "//a[@data-image-id='#{@image.id}']/../a[contains(@class, 'thumb-download')]")[:href]).to match(/https:/)

Thanks.

查看全部
weixin_33739523
weixin_33739523
2014/03/16 01:37
  • xpath
  • ajax
  • 点赞
  • 收藏
  • 回答
    私信

0个回复