super noob here so i apologize in advance for any dumb question...
I am trying to create a script that finds and image by :id, saves it's image URL (named also img src), and then clicks on the image.
so far i've done:
require 'rubygems'
require 'selenium-webdriver'
driver = Selenium::WebDriver.for:firefox
wait = Selenium::WebDriver::Wait.new(:timeout => 15)
driver.get 'http://example.com'
image = wait.until {
element = driver.find_element(:id,'id_image')
element if element.displayed?
}
#this is the part where i would like to save the IMAGE URL
image click.click
I just took the relevant part of the code, i can assure you that so far it all works perfectly but i just can't save the IMAGE URL.
Thank you!