以下のコードを見つけます。
all_links = driver.find_elements(:xpath,"//fieldset[contains(@class,'attachmentTable')]/table/tbody/tr/td/a")
all_attachment_names = driver.find_elements(:xpath,"//fieldset[contains(@class,'attachmentTable')]/legend")
all_links.each do|link|
href = link.attribute("href").strip
puts href
end
all_attachment_names.each do |name|
text = name.attribute("text")
puts text
end
- これら2つのループを組み合わせて実行する手段を作ることはできます
parallel
か? の両方loop count
が同じであるという条件で。 hash
wherekey will be text
とを作成したいitem will be href
。