【发布时间】:2015-05-20 02:57:16
【问题描述】:
我有一个包含一系列动态表格的页面。
我希望能够遍历这些表,将它们转换为哈希(使用 .hashes 方法)并将它们与 .yml 文件中的数据进行比较。
但我似乎无法让集合正常工作。
这是一种尝试(使用虚拟页面):
class ViewOnlyPages
include PageObject
page_url("https://developers.google.com/chart/interactive/docs/examples")
tables(:all_tables, :class =>'google-visualization-table-table')
def verify_page_against(page_name, dataset)
#load data from Yml
#hash spin through all tables (for each table, read each record into hash?)
self.all_tables.each do |table|
puts table.hashes
puts '---'
end
end
【问题讨论】:
标签: ruby watir pageobjects page-object-gem