Git Product home page Git Product logo

peg's People

Contributors

navpreetdevpuri avatar nitintecg avatar pauloubirajara avatar

Watchers

 avatar

peg's Issues

Improve wait_for_screen_to_change(): by using pyautogui in pthon

It will wait for changes in screen pixels from given coordinates after every delay second, and if unable to find change even after timeout seconds it will throw the error for example "Wait for screen changes timeout (21 seconds)"

coordinates for example ((0,0),(100,100) means (0,0) to (100,100) from upper-left corner. points are in persentage according to width and height of the screen

Implement click_at(mouse_button, image_file_path, click_coordinates=(50,50)) using pyautogui in main.py

click_at(mouse_button, image_file_path, click_coordinates=(50,50)): 
"""
mouse_button will be one value from constants for example MOUSE_BUTTONS.LEFT that will be equal to "left"
"""

It will locate the given image on the screen and click at 50% right 50% down at the image from the upper-left corner

Implement the following function by using the above function

  1. right_click_at()
  2. left_click_at()
  3. middle_click_at()

Handle according to response type from URL while downloading a file from chrome

Improve the following function to handle different types of responses

PEG/peg/main.py

Lines 37 to 47 in dcd2f8a

def download_file_from_url_using_chrome(self,file_url):
open_chrome()
# We got to enter url section
pyautogui.hotkey('alt', 'd')
# paste the given file url so that we can download the file
pyautogui.write(file_url)
# let file load first then we download
pyautogui.hotkey('enter', interval=3)
pyautogui.hotkey('ctrl', 's', interval=1)
# if window is there then we have to press enter button to download file
pyautogui.hotkey('enter')

There are two types of responses when we request for file
0. file opens within chrome and we need to download it manually

  1. file starts downloading automatically

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.