Giter Club home page Giter Club logo

jaiwardhan / automatedss Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 5.92 MB

Source to automatically take screenshots of URLs supplied in the list. Supports page stops if mentioned in the exception list. Made it mainly to automatically collect on call reports and collect them automatically. Can be further extended to mail them and resize them. Will be adding this in some time.

Python 100.00%
selenium-webdriver selenium-chrome browser screenshot-utility screenshot chromedriver python

automatedss's Introduction

#On Call Reporter

This module makes it easy (basically almost automatic) to send On-Call reports by taking all the relevant screenshots and placing them under one folder. You can make any other use if you want. Compatible with Python 2.xx

##Installation This is pretty straight forward. Run with python2:

python oncallReportInstaller.py

Wait for the install to compelte. This does nothing but, installs selenium and PIL libs. Also along with that, it also copies webdriver for gecko (used with selenium for clearning proxies) and webdriver for Chrome. Note: By default selenium uses Firefox, but we have made this for chrome as it is widely used here. Please headover to seleniumHQ to know more about different web browsers supported, their usage and webdrivers sources (for chrome, we got this from google's cloud and is the lates update as on 5-Jun-2017).

##Usage Run with python:

python onCallReporter.py

This will sequentially open all webpages mentioned in the python list. The flow is as follows (that you would see):

  • Triggers a web page in the browser
  • Waits for 10secs (script goes to sleep mode while the page loads)
  • Takes a screenshot, and places in the 'ss' folder
  • After script ends, sequentially prints the relevant heading of the page fetched.

Note: For some cases there is a significant time that is required (either page loading such as in Splunk or credentials such as in Nagios). They have already been specified in the 'exceptions_substrings' list. For these exceptions, the python terminal will wait for you to press ENTER whenever you feel is the correct time (by adjusting zoom size and looking that everything has loaded). Once ENTER is pressed, the screenshot is grabbed and automation proceeds as it has to. Currently we only have Splunk and Nagios in this list and the script will wait until you press ENTER to proceed.

PS: For all future usage, please keep on adding URLs to the main list (i.e. reports_for) and if you feel that this is time consuming (> 10sec loadtime), then please specify a distinct substring of this URL in the exceptions list.

##Whats next? We will use PIL to resize image to a smaller size, the exception probably being Nagios. Also a mailto config will be added to add them as attachments to a new mail window.

automatedss's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.