等待打印/放置所有可见链接 [英] watir print/put all visible links
本文介绍了等待打印/放置所有可见链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$browser.links.each do |link|
puts link.attribute_value("class")
end
如何获取 put 语句中的所有可见/现有链接?
How do I get all the visible/existing links in the put statement?
推荐答案
您也可以使用更短的语法来编写它,如下所示:
You can also write it by using shorter syntax like this:
puts $browser.links.find_all(&:present?).map(&:class_name)
这篇关于等待打印/放置所有可见链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文