tebelorg / RPA-Python

Python package for doing RPA
Apache License 2.0
4.83k stars 662 forks source link

Open a web page click on a button save generated result - use this code #126

Closed LiberTang0 closed 4 years ago

LiberTang0 commented 4 years ago

Hi everyone,

I am new to RPA, I'm testing UIPath, RPA-Pyhton to try a simple task:

I want to open this web page: https://api.join.skype.com/v1/meetnow Then click on the button "Create a free meeting":

<div class="generateButtonHolder">
                                    <button class="primary linkGeneratorButton  meetButton">
                                        <span style="position: relative;">Create a free meeting</span>
                                    </button>
                                </div>

Then save the generated link as a String. <div class="joinLinkText">join.skype.com/pLhFeXfcPbGy</div> Can you help me please, the final code will be used by a server on the cloud is this possible with RPA-Python ?

kensoh commented 4 years ago

Hi @LiberTang0, below is the code to do using RPA for Python -

import rpa as r
r.init()
r.url('https://api.join.skype.com/v1/meetnow')
r.click('Create a free meeting')
print(r.read('joinLinkText'))
r.close()

Yes this tool can be run on Windows, macOS and Linux. If you provision the computer where you install this package as a cloud instance or on a cloud server it should work too. Above code prints the following output when I run it. Have fun!

join.skype.com/XprhdUrDe6gM
LiberTang0 commented 4 years ago

Thank you @kensoh for your help, does it work for python 2.7 and python 3? Is there a minimum server config to support Python-RPA workload ?

kensoh commented 4 years ago

Yes works for Python 2 and 3. Your server must be able to install Python and Google Chrome. Low-end server should still be able to run, you can try from minimal upwards.

Note that this tool is designed to run 1 instance at any one time on the computer, thus it will not work if you try to run multiple scripts on the server at the same time.

LiberTang0 commented 4 years ago

Thank you @kensoh , how enterprise level users run multiple instance in the same time ? a Queue? Is there a Premium version for this ?

kensoh commented 4 years ago

This tool has no premium version, it is full-featured and free for all users.

You can try using Python code to form queues to run, or maybe there is some Python package that lets you implement queues easily. With a queue, you can do a FIFO (first in first out), and let the 1st request run, after that process 2nd request, until no more jobs in the queue.