Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/majioa/watir-schema
The gem to simplify automatical web-surfing using watir-webdriver
https://github.com/majioa/watir-schema
Last synced: about 2 months ago
JSON representation
The gem to simplify automatical web-surfing using watir-webdriver
- Host: GitHub
- URL: https://github.com/majioa/watir-schema
- Owner: majioa
- License: mit
- Created: 2013-09-12T05:19:03.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-05T20:19:15.000Z (over 10 years ago)
- Last Synced: 2024-04-24T07:26:53.352Z (9 months ago)
- Language: Ruby
- Size: 227 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Watir::Schema
[![Dependency Status](https://gemnasium.com/majioa/watir-schema.png)](https://gemnasium.com/majioa/watir-schema)
[![Gem Version](https://badge.fury.io/rb/watir-schema.png)](http://rubygems.org/gems/watir-schema)
[![Build Status](https://travis-ci.org/majioa/watir-schema.png?branch=master)](https://travis-ci.org/majioa/watir-schema)
[![Coverage Status](https://coveralls.io/repos/majioa/watir-schema/badge.png)](https://coveralls.io/r/majioa/watir-schema)
[![Endorse Count](http://api.coderwall.com/majioa/endorsecount.png)](http://coderwall.com/majioa)Support multiple platforms (Windows, OS X, etc.) and browsers (Chrome, Firefox, Safari, IE, etc.):
- Chrome
- Firefox
- IE (no proxy support)
- Safari (no proxy support)The tool is able to run around the clock with report at least every hour. Run of the script can be done with any scheduler like cron.
Functions:
- Launch a web surfer that will:
- Allow to use a proxy on 8080 port;
- Do a deep surf using the specified schema, including, for example, authenticated browsing on numerous websites, interacting with web forms, and random exploration of webpages;
- Return the browser's work folder;
- Store all of the surf data in a programmatically searchable log file immediately upon completion of the automated web surfing;
- Store the log results to the body of an email and send the results to the specified address at the end of each surf;## Requirements
###Linux/MacOSX:
- chromedriver: http://code.google.com/p/selenium/wiki/ChromeDriver
###Windows:
- autohotkey.exe: http://www.autohotkey.com/
- IEDriverServer.exe: http://code.google.com/p/selenium/wiki/InternetExplorerDriver
- chromedriver.exe: http://code.google.com/p/selenium/wiki/ChromeDriverAll Programs must be included in PATH variable.
## Installation
Add this line to your application's Gemfile:
gem 'watir-schema'
And then execute:
$ bundle
Or install it yourself as:
$ gem install watir-schema
Then execute the rake task :env that should automatically prepare environment, and install all requirements:
$ rake env
## Usage
Sample run:
$ watir-schema -v 5 -s schema.yaml -d ~/ -e [email protected]
This will set log level 5 (extremely excessive), surf the web using schema.yaml config, and store browser data in the '~/' folder, and then send report to collected log specified [email protected].
Help info on the tool:
$ watir-schema -h
This is a watir-schema script, how to use it see below
-v, --verbose 1 enable verbose output, values: 0 to 5
-s, --schema set schema YAML-file to proceed
-b, --browser firefox use browser to surf, values: msie|firefox|chrome|safari
-p, --[no-]proxy use proxy
-d, --dir set base dir to store results
-t, --store store web-browser state into a folder
-e, --email set an email to report test results
-l, --log set output flow to a file
-h, --help Show this message
-V, --version Print version
## File schema.yamlSample schema.yaml is shewn below:
---
report:
server: smtp.gmail.com
port: 587
domain: domain.com
login: [email protected]
tls: true
password: 'password'
auth_type: :plain # or :plain or :login or :cram_md5
from: '[email protected]'
from_name: 'Name of User'
body: ! "From: %from_name <%from>\n
Subject: Watir web-surfing report"
sites:
google.com:
schema:
- 'a:id:gb_70:%C'
- 't:id:Email:%[email protected]='
- 't:id:Passwd:%S=password='
- 'i:id:signIn:C'
- 't:name:q:%S=2012 Audi A6='
- 'b:name:btnG:C'## 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