【发布时间】:2013-05-12 21:05:17
【问题描述】:
我有一行代码可以使用除 poltergeist 之外的任何驱动程序获取页面上元素的内容。这是 poltergeist 的预期行为吗?如果是这样,我怎样才能以与 poltergeist 一起使用的方式做到这一点?
这是红宝石
page.find( item_price_selector(3) ).native.text
这是错误
Failure/Error: price = page.find( item_price_selector(3) ).native.text
NoMethodError:
undefined method `text' for #<Capybara::Poltergeist::Node:0xb07db1c>
【问题讨论】:
标签: capybara poltergeist