GithubHelp home page GithubHelp logo

lcl101 / pyrpa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bartmao/pyrpa

0.0 0.0 0.0 556 KB

A RPA framework automated by Python, can integrated with other RPA tools, like UIPath

Python 54.26% C# 45.74%

pyrpa's Introduction

pyRPA

A RPA framework automated by Python, can also integrated with other RPA tools, like UIPath. Currently support

  1. Desktop/Broswer automation driven by UIPath (RPA.UIPathAdapter)
  2. Desktop/Broswer automation driven by Python code (In Progressing...)
  3. Android automation

The main idea I use python to do RPA because:

  1. Pure code is easier to maintain compared to auto-generated code by the RPA designers
  2. Can easily do the interception things
  3. Can easily cross platform

Setup

Using UIPath

  1. Checkout file [pyRPA/RPA.UIPathAdapter/binary/RPA.UIPathAdapter.exe.config], update UIPathActFolder to your own uipath folder
  2. Run adapter pyRPA/RPA.UIPathAdapter/binary/RPA.UIPathAdapter.exe under administrator permission

Using Andriod

  1. Install adb
  2. Install android SDK(optional, we can use /uiautomator to inspect elements)

Sample driven by UIPath (samples/sample.py)

This sample will automatically open notepad, type something and close it.

  1. It will create logs before and after each UI automation
  2. It will highlight the element to be operated

1 Output:

Before execution of selector [btn_windows], method [click]
After execution of selector [btn_windows], method [click]
Before execution of selector [], method [typetext]
After execution of selector [], method [typetext]
Before execution of selector [], method [sendhotkey]
After execution of selector [], method [sendhotkey]
Before execution of selector [win_notepad], method [typetext]
After execution of selector [win_notepad], method [typetext]
Before execution of selector [btn_notepad_close], method [click]
After execution of selector [btn_notepad_close], method [click]
Before execution of selector [btn_notepad_cancel], method [click]
After execution of selector [btn_notepad_cancel], method [click]

Sample on Android (samples/sample-andriod.py)

This sample will search specific contact and print the phone number for you

1 Output:

PS C:\Users\bmao002\Desktop\Projects\pyRPA> python .\sample-andriod.py
{"selector": "", "method": "start", "args": {"app": "contacts"}, "attrs": {}}
Warning: Activity not started, its current task has been brought to the front
{"selector": "<andriod resource-id='com.android.contacts:id/searchbarleft'/>", "method": "click", "args": {"type": 0, "button": 0, "pos": 4, "method": 2}, "attrs": {}}
.//node[@resource-id="com.android.contacts:id/searchbarleft"]
performing click @[241.0, 303.0]
{"selector": "", "method": "typetext", "args": {"text": "Bart", "method": 1}, "attrs": {}}
performing typing
{"selector": "<andriod resource-id='com.android.contacts:id/name'/>", "method": "click", "args": {"type": 0, "button": 0, "pos": 4, "method": 2}, "attrs": {}}
performing click @[411.0, 392.5]
{"selector": "<andriod resource-id='com.android.contacts:id/data'/>", "method": "gettext", "args": {}, "attrs": {}}
.//node[@resource-id="com.android.contacts:id/data"]
performing gettext
Bart'Phone Number is 188 8888 8888

pyrpa's People

Contributors

bartmao 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.