title: Selenium-Webdriver Ruby --> How to wait for images to be fully loaded after click
body: <p>I am very new to Ruby and Selenium-Webdriver, so please, help :)</p>
  
  <p>I am trying to open email campaign , sent to my inbox, that has images and take a screenshot in the firefox. But i can not make it wait until images is fully loaded. Once i click on 'Show images' , screenshot is already taken , but image is not loaded at that time. How can i pause the script and take screenshot some time later, after all images is displayed? </p>
  
  <p>Please, help :( </p>
  
  <p>Bellow is my script: </p>
  
  <pre><code>enter code here
  
  require 'selenium-webdriver'
  
  browser = Selenium::WebDriver.for :firefox
  
  #==========================================================================================
  
  wait = browser.manage.timeouts.implicit_wait = 15
  #==========================================================================================
  url = 'https://login.yahoo.com/config/login_verify2?.intl=us&amp;.src=ym'
  # Open browser (firefox)
  browser.navigate.to url
  browser.find_element(:id, 'username').send_keys "some yahoo id"
  browser.find_element(:id, 'passwd').send_key "some password"
  browser.find_element(:id, ".save").click
  browser.find_element(:id, "inbox-label").click
  browser.find_element(:xpath, "//div[@class='subj']").click
  browser.find_element(:xpath, "//a[@title='Display blocked images']").click
  
  result_page_title = browser.find_element(:tag_name, 'title')
      puts "Title of the page: \t\t: #{result_page_title.text}"
      browser.save_screenshot "1.jpg"
  </code></pre>