我收到以下代码部分的错误:
element = driver.find_element :name => "used_by"
element.send_keys "371101"
element = driver.find_element :name => "btnSearch"
element.click
all_table_data = driver.find_element(:tag_name, "td").text
all_table_data.each do |td|
puts td.text
end
print element
错误:
D:\Ruby script>ruby filedownload.rb
filedownload.rb:24:in `<main>': undefined method `each' for #<Selenium::WebDrive
r::Element:0x2556be8> (NoMethodError)
D:\Ruby script>
谁能帮我解决这个错误?