Skip to content

Get Watir::Image's content copy without external download

License

Notifications You must be signed in to change notification settings

nelsongc/watir-get-image-content

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Return content of image as base64-encoded png

Build Status

Installation

Add this line to your application's Gemfile:

gem 'watir-get-image-content'

And then execute:

$ bundle

Or install it yourself as:

$ gem install watir-get-image-content

Usage

require 'watir-webdriver'
require 'watir-get-image-content'
browser = Watir::Browser.new
browser.goto 'http://for_example.com/page_with_images'

browser.image(:index, 1).to_png_base64        
browser.image(:alt, 'Alt text').to_png_base64

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Get Watir::Image's content copy without external download

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 95.8%
  • HTML 4.2%