lib/pwn/plugins/transparent_browser.rb in pwn-0.4.862 vs lib/pwn/plugins/transparent_browser.rb in pwn-0.4.863
- old
+ new
@@ -282,10 +282,10 @@
public_class_method def self.find_element_by_text(opts = {})
browser_obj = opts[:browser_obj]
text = opts[:text].to_s
- elements_found = browser_obj[:browser].elements.each do |element|
+ elements_found = browser_obj[:browser].elements.select do |element|
element.text == text
end
elements_found.each do |element_found|
@@logger.info("#{element_found.html}\n\n\n")