【发布时间】:2015-06-18 07:11:55
【问题描述】:
我有三个 Textview,我想比较两个 Textview 与第三个的数据差异。我正在使用下面的代码,但它对我不起作用。请帮我解决这个问题。
Then /^I checked "([^\"]*)" transactions count with first TextView "([^\"]*)" second TextView "([^\"]*)"$/ do |nid,rid,vid|
totalReceivedCount=query("TextView id:'#{rid}'", :text).first.to_i
totalReturnedCount=query("TextView iid:'#{vid}'", :text).first.to_i
totalSummaryCount=query("TextView id:'#{nid}'", :text).first.to_i
unless totalSummaryTransactionCount == totalReceivedCount - totalReturnedCount
fail "Total not equal"
end
end
【问题讨论】:
标签: android automation automated-tests calabash calabash-android