Friday, May 31, 2019

Robotic Process Automation - Sample automation via TagUI and Sikuli

Scenario: Using an R function via Rstudio through RPA (Robotic Process Automation)

Steps to be automated
1.       Go to RStudio
2.       Open the Project
3.       Open the R file
4.       Run the R script
5.       Run the function in the console

Script w/ comments
//Open RStudio
click RStudio.PNG 
//Wait 5 seconds
Wait 5
//click button referencing file.PNG
click File.PNG
Wait 1
Click OpenProject.PNG
Wait 1
Click Path.PNG
//in current location, press backspace
vision type(Key.BACKSPACE)
// in current location input text
vision type('E:\Ivan\Coursera\R\BuildingRPackages\AssignmentWeek2\Week2')
vision type(Key.ENTER)
click week2proj.PNG
click open.PNG
Wait 5
click Files.PNG
click fars_func.PNG
Wait 2
click source.PNG
click console.PNG
vision type('fars_map_state(1,2015)')
vision type(Key.ENTER)

Screenshots of the buttons need to be saved in the same folder as script
Running the script in Command Prompt (Path Masked in screenshot)