Coder Social home page Coder Social logo

ytgz / webbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nateshmbhat/webbot

0.0 0.0 0.0 15.24 MB

Web automation library for simple and easy end to end testing and web browser automation that offers super charged features while keeping it simple to use and master

Home Page: https://pypi.org/project/webbot/

License: Mozilla Public License 2.0

Python 100.00%

webbot's Introduction

๐Ÿค– Crazy Smart Web automation and testing library for python

Downloads Downloads

webbot provides a much feature rich automation than selenium for all kinds of automation of webpage. Since the major portion of web automation is to perform actions like click and type into webpage elements , webbot automatically handles finding the right elements to perform the actions.

Buy me a coffee ๐Ÿ˜‡Buy me a coffee ๐Ÿ˜‡

Features :

  • Click any button or link without having to worry about finding the element first or knowing css_selectors , xpath etc
  • Automate and test pages loaded dynamically by javascript.
  • Smart scoring algorithm which finds the best matching elements on which you want to perform the action .
  • The entire automation process can be made without having to open the browser window i.e in the background as a console process (see docs for more details )
  • Use any combination of selectors like id, name, text, css etc to perform actions on elements with one line of code.
  • Automation designed to work even in case of webpages with dynamically changing id and classname
  • Immensely minimizes the code required for performing input actions like clicks and keyboard actions.
  • Get webpage source , cookies , total tabs , webpage title etc..
  • Simulate key presses and special key combinations
  • Bidirectional scrolling
  • Perform an action on webpage elements by applying various filters to select the elements .
  • Perfrom action on multiple elements at once.

Installation :

pip install webbot

If "No distribution found error occurs" just update setuptools using pip install --upgrade setuptools

Quickstart :

Demo code 0 :
from webbot import Browser 
web = Browser()
web.go_to('google.com') 
web.type('hello its me')  # or web.press(web.Key.SHIFT + 'hello its me')
web.press(web.Key.ENTER)
web.go_back()
web.click('Sign in')
web.type('[email protected]' , into='Email')
web.click('NEXT' , tag='span')
web.type('mypassword' , into='Password' , id='passwordFieldId')
web.click('NEXT' , tag='span') # you are logged in . woohoooo

Demo code 1 :

If multiple buttons with similar properties are to be clicked at once

web = Browser()
web.go_to('siteurl.com')
web.click('buttontext' , multiple = True)
Demo code 2 :

If there are multiple elements and you want to perform action on one of them

web = Browser()
web.go_to('siteurl.com')

# types the text into the 3rd input element when there are multiple input elements with form-input class
web.type('im robo typing' , number = 3 , classname="form-input" ) 

web.click('Post')


Links :

webbot's People

Contributors

nateshmbhat avatar leonheess avatar ytgz avatar paszymaja avatar noesberger avatar hoggatt avatar gitpushpulllegs avatar dillonb07 avatar danksidesparkles avatar qinfeng avatar

webbot's Issues

add privacy pass extension

Description

Add privacy pass browser extension in order to access cloudflare protected pages, as described here.

Tasks

  • add extension to firefox driver
  • add extension to chrome driver

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.