Giter Site home page Giter Site logo

automating_with_python's Introduction

Automating with python

This repo provides examples of using Python for Automation. Any repetitive online task can be optimized with a Python script.

Dependencies

pip3 install beautifulsoup4

pip3 install lxml

pip3 install requests

pip3 install selenium

pip install -U python-dotenv

API automated tests

cd API_tests navigate to the API test sub-dir

python3 apiCall.py

python3 apiKey.py

Automate web browsing

cd automate_web_browsing

python3 dragAndDrop.py

python3 googleEarthBrowse.py

python3 webBrowse.py

Execute cmd

cd execute_cmds

python3 example.py

python3 script.py

fileIO

cd fileIO

python3 fileIO.py

Web scraping

cd web_scraping

python3 scrapePages.py

python3 scrape.py

Issues and considerations

Why to use Wait functions

  • Many websites use asynchronous techniques to load content
  • Technique creates a problem when Selenium tries to locate an element that isn't loaded
  • Avoid exceptions in scripts

Explicit wait functions - will wait until a condition is satisfied

Implicit wait functions - pull DOM for a certain amount of time, until the element becomes available

python3 googleEarthBrowse.py > example of explicit wait

automating_with_python's People

Contributors

jhamm1 avatar

Stargazers

 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.