Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

105

Share

Automation Anywhere Examples

We will provide you these pdf materials as part of Automation anywhere training

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Automation Anywhere Examples

  1. 1. AUTOMATION ANYWHERE PRACTICALS
  2. 2. Zip Files That Are More Than 5 MB In Size Task Description Copy all the files of a folder that are more than 5 MB in size to another location and zip all the copied files with the current date as the zip file name. T34.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create New Task o Click on New-> Task Editor. 2. Copy all the files having size more than 5 MB o From the Program/Files/Windows category, select Files/Folders command. In the Files/Folders wizard click on Copy File(s) option. Specify source & destination folder. o Copy Files "C:MyFolder*.*" to "C:MyFolderDocumentFiles" if file size is at least 5120 KB o Click on the "Advance View >>" button and then click on size. From the list select at least, and specify the size as in the KB textbox. o e.g. for 5MB specify 5120 KB for 1MB specify 1024 KB
  3. 3. 3. Zip all the files from a folder o From the Program/Files/Windows category, select Files/Folders command and select Zip File(s) option. Specify the path from where you want to zip all the files, also, specify the destination zip file name along with the path. To specify today's date as filename, press F2 for the list of variables. Select Day variable, again press F2 and select Month variable, and again press F2 and select Year variable, and at the end specify ".zip" as the extension. o Zip file(s) from "C:MyFolderDocumentFiles" into file "C:MyFolderDocumentFiles$Day$_$Month$_$Year$.zip"
  4. 4. When you run this task, it copies all the files that have size more than 5 MB, zip's the copied files with the current date as the file name. Using OCR To Integrate With Command Line FTP Task Description Web and Desktop applications are filled with images that need to be converted to a readable text for certain actions to be performed. OCR technology is used to do just that. The task below logs into FTP server via DOS and waits to check if logged in successfully. It uses OCR technology to retrieve information from Command Prompt in to readable text to check whether login was successful.
  5. 5. T79.atmx Note: Save the xls in C: drive, the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task o Click on New -> Task Editor. 2. Insert Open Program/File command to open command prompt o Type cmd.exe in program/file text box. o Save the command. 3. Enter necessary keystrokes required to log in to the ftp server. 4. Insert Loop command o Insert 5 times loop command.
  6. 6. 5. Insert OCR command to capture the text from command prompt. o Select window from the drop down. o Click on view capture text. o Select variable from drop down. o Click on save button. 6. Enter if command to check logged in successfully or not. o Enter $str$ variable. o Select Includes operation. o Select Fix option. o Type logged in in fix text box. o Save the command.
  7. 7. 7. Enter exit loop command in if condition. 8. Save and Run the task. When you run this task, all the commands necessary to login to server are entered. It waits for some time to login to server. It uses the OCR technology to check whether login was successful or not. Using Application Integration To Integrate Terminal Emulator Program Task Description Often businesses need to get data from application windows that have no way of getting data. For such cases, Automation Anywhere features App Integration. This task checks if a user has logged in successfully to a FTP server using Putty. It captures data from Putty application window and checks for the string logged in to ensure the user is logged in successfully. T81.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Connect to remote machine using Putty o Insert Open Program/files command.
  8. 8. o Type path of putty exe for e.g. C:puttytel.exe. o Double click on Manage Windows Control command found under Programs/Windows/Files command category, select Putty application window, capture Host Name of the Textbox and Set Text option specify the machine name for e.g. Pc9
  9. 9. o Double click on Manage Windows Control command, select Putty application window, capture radio button of Telnet and select Select the Radio button option.
  10. 10. o Double click on Manage Windows Control command, select Putty application window, capture Open button and select Click option.
  11. 11. 2. Login to FTP server using Putty o Insert necessary keystrokes commands to login to ftp server.
  12. 12. 3. Use App Integration command to capture the data in Putty window o Double click App Integration command, select Other from drop down of Application, select window of putty application, click on View Captured Text window and select Prompt- Assignment from the variable drop down.
  13. 13. 4. Using If command check if user is logged in successfully o Double click on If command found under Conditions/Loops command category, select Variable option and click on Edit button, insert Prompt-Assignment using F2 key, select Includes option from the drop down, select Fix option and type logged in in text box.
  14. 14. o You can put this command inside Loop times command to repeat the action in case the system takes time to login. o Insert Exit loop command inside if command if ftp server is connected. 5. How to run the task o In case you do not have Automation Anywhere installed, please download and install it from, o Save T100.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks
  15. 15. To run this task edit the commands and make necessary changes related to ftp server and putty exe path. When we run this task it opens putty application; enter user name and password necessary to login to ftp server and capture the text and checks if it contains logged in maximum five times until the ftp server is logged in successful. Use Automation Anywhere Services With Your Scripts- VBScripts_JScripts Task Description Use Automation Anywhere services with your scripts. Solutions 1. Use your scripts from Automation Anywhere Automation Anywhere serves as an automation platform to run, integrate, schedule, and manage scripts such as VBScripts and JScripts. Following is a list of features from Automation Anywhere that you can leverage with your existing scripts.
  16. 16. o Set different Repeat options for your scripts o Send Email notification once the script is over. You can set it up from the 'Notification' tab o Assign a Hotkey to the script to launch it instantly o Schedule it by clicking on 'Schedule' button and specifying the scheduling options. Transfer Data From Excel To Any Application Task Description Transfer data from Excel to any application. Pre-requisites: Before you run this task, your Excel file and the destination application, both should be open. T57.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solution
  17. 17. 1. Create new task o Let's say you want to transfer the data present in Excel column as shown in Screenshot 1. o We will create a task that transfers one cell of Excel and then we will set the Repeat property of Automation Anywhere to transfer multiple cells to the destination application. o In the main Automation Anywhere window click on Tools->Task Editor. o From the list of commands, double-click the 'Insert Keystrokes o Select the title of your Excel file from the dropdown list and specify the keystrokes to copy one cell data as shown:
  18. 18. o Click on Save button in the Insert Keystrokes command. o Now your task looks as shown:
  19. 19. o Now enter another Keystroke command in the same Excel window similar to above command, but in this command enter the keystrokes to move to the next cell for e.g. Down Arrow as shown: o Save the command. o Now the task should look as shown:
  20. 20. o Now let's paste the data (copied from Excel) into your target application. Here for illustrative purpose we will use Microsoft Word but it can be any application. o As shown above, now enter the keystroke actions in the Word window to paste the copied data.. o In above Keystroke action, we also move to the next column in the Microsoft Word table using the Right Arrow after copying the data. o Now the complete task will look as shown in Screenshot 7. o Save the task and give it appropriate name. 2. Transfer multiple rows from Excel o After saving the task from editor, come back to main Automation Anywhere window. o Select your task from the list and click on Repeat section under Properties tab and specify the number of repeats. This is equal to the number of rows you want to transfer from Excel window to Word window in this example.
  21. 21. 3. Pre-requisites before running the task o Since in this task we are not using any mouse clicks to select the first cell, it is essential you keep the first cell selected in your Excel file before running the task as shown in Screenshot 1. o Keep your destination application also open. When you run this task, it copies one cell of excel using keystrokes and pastes it to the target application (Microsoft Word in this case) using keystrokes. When the task is repeated, it transfers as many cells from Excel to Word. Transfer Data From Access To Excel Using Excel Integration Task Description Transfers product data from Access to Excel using Excel Integration. T65.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solution 1. Connect to database o From Application Category->Database, Select 'Connect' option. For our example we are using MS Access as the database, but other databases like Oracle, SQL Server, My SQL, MS SQL, etc. may also be used. o Select SQL query option and specify the query. e.g. select * from Employee. When the query is executed, it will return all the data of the Employee table.
  22. 22. 2. Open Spreadsheet o From Application Category->Excel, Select 'Open Spreadsheet' option.
  23. 23. 3. Transfer Data o Insert the commands to paste the data from the database into the Excel spreadsheet. The commands for pasting data into Excel are: Excel : Go to beginning of the row of the active cell Excel : Set value of Active Cell with "$Dataset Column(1)$" Excel : Go to one cell right of active cell o Repeat above commands for each column of the access database. Insert a loop for each row of the database o After the task runs the Excel spreadsheet will contain the employee data.
  24. 24. When you run this task, it reads the values from a database and inserts them one by one into the Excel spreadsheet. Test And Validate Online Shopping Cart Functionality
  25. 25. Task Description Online shopping cart is arguably the most important part of an E-Commerce site. Testing shopping cart is essential to success of any E-commerce site. This task shows how you can test online shopping cart. Note: This sample task uses an example of www.barnesandnobel.com just for illustrative purposes. T49.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Record a new task o Click on Tools->Web Recorder. o Type in http://www.barnesandnobel.com/ and click on Start o Select ISBN from the dropdown. Enter any ISBN number for e.g. 074322566X. o Click on Search. o Click on 'Add To Cart' o Click on 'View Entire Cart' o Click on 'Import Table' button from the toolbar on the bottom right hand corner of the screen. o Click in the 'Price' column to capture the pricing table. o Stop Recording and Save the task. 2. Validate your Shopping Cart
  26. 26. o After Import Table command is executed, you can use System Variable command, $Table Column(index)$ to extract the row data of the Table when the task runs. o Open the Task in Editor to insert loop and conditional commands to validate the shopping cart. o Insert a Conditional command inside the Loop command to verify if the $Table Column(4)$ has the value 16.00 i.e. the price of the book. o This way when you run the task it will import the tabular data of the shopping cart and look for the expected price and if found, will show a message box How to find which index to use in System Variable $Table Column$? o While recording, when you click on the Import Table and capture a table, it will ask you for a csv file name. o Specify a valid filename. o Run the recorded task once. It will generate the csv file. o Open the csv file in Excel and find out which column your data is in and that is the index you need to use. When you run this task, it adds one book to the cart and validates the expected price of the book in the shopping cart. Terminal Emulator Automation-Checking For Malware In Remote Machine Terminal Emulator Automation: Checking for malware in remote machine by looking at which programs initiate connections
  27. 27. Task Description This task shows you how using Automation Anywhere, you can easily automate any type of Terminal Emulator. This example looks at the programs on the remote machine that are making connections with the outside world, and check if any unexpected program or malware is present in the list. T78.atmx Solutions 1. Create new task o Click on New -> Task Editor. 2. Connect to Terminal o Using the Terminal Emulator command, select the Connect action. o Specify a Session name. o Specify the Host name and Terminal prompt of the remote machine to connect. 3. Wait till text login appears on terminal screen o Select the Terminal Emulator ->Wait action. o Specify the Session name. o Select Wait till text appears option in Terminal Event. o Specify login as Text.
  28. 28. 4. Send username to Terminal o Select the Terminal Emulator->Send Text action. o Specify the Session name. o Specify the <username> for the remote machine as Text. o In Wait for terminal prompt to appear, select Dont Wait.
  29. 29. 5. Wait till text password appears on terminal screen o Select the Terminal Emulator->Wait action. o Specify the Session name. o Select Wait till text appears option in Terminal Event. o Specify password as Text. 6. Send password to Terminal o Select the Terminal Emulator->Send Text action. o Specify the Session name. o Specify the <password> for the remote machine as Text.
  30. 30. o In Wait for terminal prompt to appear, select After sending text. 7. Send netstat command to Terminal o Select the Terminal Emulator->Send Text action. o Specify the Session name. o Specify the command netstat b as Text and redirect the output to a file in the shared folder of the local machine. o In Wait for terminal prompt to appear, select After sending text. 8. Disconnect from Terminal o Select the Terminal Emulator ->Disconnect action. o Specify the Session name.
  31. 31. 9. Save the task. 10. How to run the task: o Copy T97.atmx to location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Change remote machine name, username, password and folder name as per your computer. o Launch Automation Anywhere and from Task List select T97.atmx and click on RUN button to run the task. Synchronize Modified Files With FTP Server Task Description Daily synchronize modified files with FTP server. T56.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task o Click on Tools ->Task Editor. 2. Connect to FTP server o From the Internet Category double-click on FTP command. o Insert a FTP connect command to connect to your FTP server.
  32. 32. 3. Move your daily work files to a pre-defined folder o From Program/Files/Windows category double-click on Files/Folders. o Select the Copy Files option o Specify the source and destination folders. o In advance option, specify an option to copy files modified only within last 1 day. 4. Synchronize your files with FTP o Insert a Loop command to Loop for each File in a folder where your files reside. o Within the Loop, insert an FTP Put File command to upload all the files modified within last 1 day. 5. Schedule the task o Using the schedule property in the main Automation Anywhere window, schedule this task to run after midnight so all the files modified today will be uploaded to the FTP server. When you run this task, it will copy all the files modified today to a temporary folder. Then it will loop through each file in the temporary folder and upload them one after another. Synchronize Folders Task Description
  33. 33. Synchronize two folders T32.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks. Solutions 1. Create New Task o Click on New -> Task Editor. 2. Loop through each file in a folder o Using the Loop command from the Conditions / Loops category, select "Each file in a folder" option. o Select a source folder by clicking on the "Browse..." button. o Start Loop "Each File in F:SourceFolder" o End Loop
  34. 34. 3. Check for the existence of the file in the destination folder o Using the IF command from the Conditions/Loops category, select "File does not exist" option from the IF interface. o In the "Select File" textbox specify "F:DestinationFolder$FileName$.$Extension$". Note: "F:DestinationFolder": It is destination folder in which the current file is to be searched. "$FileName$.$Extension$": $FileName$ and $Extension$ are system variables. $FileName$: Contain the name of the file currently referred in the loop without the extension. $Extension$: Contain the extension of the file currently referred in the loop.
  35. 35. 4. Copy the file from the source folder, if the file does not exist in the destination folder o Using the Files/Folders command from the Programs/Files/Windows category, select "Copy File(s)" option from the Files /Folders interface. In the "Source File(s) with Path" textbox specify, "F:SourceFolder$FileName$.$Extension$" and in the "Destination Folder with path specify "F:DestinationFolder$FileName$.$Extension$" Note: "F:SourceFolder": It is the source folder referred in the loop, from which the file has to be deleted. "F:DestinationFolder": It is the destination folder, whose files are compared with the source folder.
  36. 36. 5. Synchronize destination folder o Repeat steps 2, 3 and 4 for coping files from destination folder that do not exist in the source folder.
  37. 37. When you run this task, it will create new folders in your given drive and backup data from your local folders to these newly created folders. SNMP To Manage Agents Task Description Managing various agents across the network by setting a new value and sending email if any authentication fails. T75.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks. Solutions 1. Create new task o Click Tools -> Task Editor. 2. Get value o Select the 'SNMP' command.
  38. 38. o Select Get option. o Select the variable to store the value. 3. Set new value o Using If variable command check the value of the variable. o If the value is oldValue then set new value using Set option of the 'SNMP' command.
  39. 39. 4. Get info if any trap at agent side and send email o Select the 'SNMP' command. o Select Send trap option. o Specify the agent, object id and select trap type. o Using Send Email command send this trap log file which has all details.
  40. 40. When you run this task, it will get the value of the OID of the particular agent, check it with the fix value, if its oldValue it will set the new specified value. An email will be sent with the log file of trap if any authentication fails. SMS Marketing Task Description Send the same message to a list of mobile numbers through yahoo. T08.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create a List of mobile numbers Create List Variable from Tools Menu > Variable Manager. Make sure User Variables tab is selected. Click Add New Variable and in 'Type' selection select List. Type user names. Give an appropriate name to List Variable (say MobileNo) and save the List Variable.
  41. 41. 2. Record a Task Record a task to send a message to one particular mobile number through Yahoo Messenger's Text feature ("Start a Mobile Conversation" feature). 3. Replace your mobile number in the task with the variable Open the task in the editor. Identify and edit the keystroke action that has the phone number and then replace the phone number with the variable you declared earlier (say "MobileNo").
  42. 42. 4. Loop through the list of mobile numbers Identify the action from where you started a mobile conversation, from there till you had sent the mobile message and put all those actions inside a Loop command for list variable "MobileNo".
  43. 43. When you run this task, it will send your message to all the mobile numbers in your list. Server Monitoring Task Description Monitors the server and send an email alert if the server is down. T40.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task o Click New->Task Editor. 2. Monitor the server o Select Loop command, select "Start Loop" option and select 'Condition' o Select 'Ping Successful' option o Specify the address of the server of to be monitored. o Insert some delay so that loop is checking every few seconds or minutes.
  44. 44. 3. Notify Administrator o If the server crashes, the task will stop executing the Loop and will send an email alert.
  45. 45. When you run this task, it monitors the server constantly. As soon as the server goes down or stops responding to Ping requests it sends an email alert. Send An Email To A List Of Contacts Task Description Send an Email (e.g. a Marketing email or newsletter) to a list of contacts. T04.atmx (Solution A) and T04r.atmx (Solution B) Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions You can send text emails to your list of contacts using 'Send e-mail' feature provided by Automation Anywhere. See Solution - A. If you want to use your own email client see Solution - B. Solution A 1. Create list of email addresses o Create List Variable from Tools Menu -> Variable Manager. o Make sure User Variables tab is selected. Click Add New Variable and in 'Type' selection select List. Type email addresses. Give an appropriate name to List Variable (say MyContacts) and save the List Variable.
  46. 46. 2. end text e-mail to a list of email addresses o Select 'Send email' command from the 'Internet' category and insert the list variable (MyContacts) in the 'TO' field. o Keep this command in a Loop for List variable.
  47. 47. 3. Create list of email addresses o Create List Variable from Tools Menu -> Variable Manager. o Make sure User Variables tab is selected. Click Add New Variable and in 'Type' selection select List. Type email addresses. Give an appropriate name to List Variable (say MyContacts) and save the List Variable. 4. Record task to send an email o Click on Record to Record a New Task.
  48. 48. o Open Outlook Express (or any other mail program). Create a new mail. Insert your own email address in To field. Enter Subject, Message & send email. Once mail is sent, stop the recording & save the task. 5. Replace To email address with email list o In the Task Editor, identify the action where you typed in your email address. Double click or right click and select Edit Keystroke event. o Replace your email address with MyContacts variable and save the Keystroke event. 6. Loop through all email addresses o From Commands window on the left select Conditions / Loops->Loop. o Select List option and specify the email list variable you created. o Now using Up/Down arrow key in the tool bar make the "Start Loop" is the 1st statement and End Loop is the last statement.
  49. 49. When you run this task, it will re-play the create e-mail functionality and will repeat this procedure for all entries in your MyContact List. Scrape Web Data And Transfer It To Your Database Task Description Scrape web data and transfer it to your database. For e.g. scrape information from an online book database and build your database. This sample task uses an example from http://www.getabstract.com/summaries/27000000/onlineDate/all/paged/en/it-production-and- logistics.html just for illustrative purposes. T60.atmx Books.mdb Solution 1. Record a new task o Click on Tools->Web Recorder. o Enter the starting URL for e.g. http://www.getabstract.com/summaries/27000000/onlineDate/all/paged/en/ it-production-and-logistics.html and click on Start button. o Click on Show all link. o Extract list of books on webpage. For that, click on 'Extract Data' button in the Web Recorder toolbar. o From Extract Data Option window, select 'Pattern Based Data' option and click on 'Next' button to start 'Extract Multiple Data' wizard.
  50. 50. o Step1 of wizard is to select the fields you need to extract. Click on 'Add' button and capture a part from list. You will be presented with a small window having 'Capture' button. Click on that 'Capture' button to capture another instance of same field in order to match the pattern. Specify the Column Name in 'Extract Data Field' window and save. o After you captured the fields, click on 'Next' link. In Step2, you can specify if data is in multiple pages. In this case, the data is in single page so you can skip this step and click on Next button. o In Step3, specify the name and path of CSV file, where you need to save the extracted data for e.g. C:Books.csv. You can view the data using 'Preview Data' button. Eventually, click on Finish button to complete the wizard.
  51. 51. o Stop the recording and save the task. 2. Import the extracted data into your database. o Open the recorded task in Task Editor from Tools-> Task Editor. o After you extracted the book details at Line #3, connect to your database using Database:Connect command.
  52. 52. o Then insert Read from CSV/Text File command to open C:Books.csv. o After Read from CSV/Text File command, insert Loop for each row in CSV/Text File command. o Inside this loop block, insert Execute SQL query command to insert the data into database.
  53. 53. o Using String Manipulation command you can trim the extracted data or extract the part of data extracted from web. o Entire task will look as shown: 3. How to run the task o In case you do not have Automation Anywhere installed, please download and install it from,
  54. 54. o Save T77.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Copy Books.mdb under C: o Launch Automation Anywhere and from Task List select T77.atmx and click on RUN button to run the task. When you run this task, it will extract the book details from a website into CSV file then will loop through all the extracted book details in CSV file and transfer it to the database. Scrape Unstructured Data From The Web And Transfer It To Task Description Scrape unstructured data from the web and transfer it to Excel. This sample task uses an example from http://www.partsgeek.com/catalog/2003/bmw/z4/air_intake/air_mass_meter.html just for illustrative purposes. T62.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solution 1. Record a new task o Click on Tools->Web Recorder. o Enter the starting URL for e.g. http://www.partsgeek.com/catalog/2003/bmw/z4/air_intake/air_mass_meter.html and click on Start button. o Extract list of Related Parts from left panel on webpage. For that, click on 'Extract Data' button in the Web Recorder toolbar. o From Extract Data Option window, select 'Pattern Based Data' option and click on 'Next' button to start 'Extract Multiple Data' wizard. o Step1 of wizard is to select the fields you need to extract. Click on 'Add' button and capture a part from list for e.g. Air Filter. You will be presented with a small window having 'Capture' button. Click on that 'Capture' button to capture another instance of same field in order to match the pattern for e.g. Air Mass Meter.
  55. 55. o Specify the Column Name in 'Extract Data Field' window and save. o After you captured the field, click on 'Next' link. In Step2, you can specify if data is in multiple pages. In this case, the data is in single page so you can skip this step and click on Next button.
  56. 56. o In Step3, specify the name and path of CSV file, where you need to save the extracted data for e.g. C:Parts.csv. You can view the data using 'Preview Data' button. Eventually, click on Finish button to complete the wizard. o Click on any Part under Related Parts say Air Pump.
  57. 57. 2. Extract unstructured data o To extract unstructured Part details on right side of webpage, click on 'Extract Data' button in the Web Recorder toolbar. o From Extract Data Option window, select 'Pattern Based Data' option and click on 'Next' button to start 'Extract Multiple Data' wizard. o In Step1 of wizard capture/add number of fields you want to extract data from webpage (Screenshot 2). For e.g. Part Name, Part Number and Price. Screenshot 3 o After you captured all the fields, click on 'Next' link. In Step2 click on Next button. o In Step3, specify the name and path of CSV file, where you need to save the extracted data say C:PartDetails.csv. Click on Finish button to complete the wizard. o Stop the recording and save the task. 3. Edit the task to extract unstructured data for all the items (Parts) in list o Open the recorded task in Task Editor from Tools-> Task Editor. o After you extracted the list of Parts at Line #2, insert Read from CSV/Text File command to open C:Parts.csv. o After Read from CSV/Text File command, insert Loop for each row in CSV/Text File command. o Inside this loop block, put commands that clicks on Part link and extracts the Unstructured data. o Double-click on command that clicks on Part link and replace the actual Part with system variable, $Filedata Column(1)$. Save the command. Screenshot 4 o Entire task will look as in Screenshot 5. 4. How to run the task:
  58. 58. o In case you do not have Automation Anywhere installed, please download and install it from, o Save T79.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Copy Data.xls under C: o Launch Automation Anywhere and from Task List select T79.atmx and click on RUN button to run the task. When you run this task, it will extract the required data (unstructured) from the web page into CSV file. Scrape Tabular Data From Web Task Description Scrape the tabular data from the web and transfer it to your own application. Solution 1. Create a new task o Click on Tools->Web Recorder o Specify your website from where you want to scrape the tabular data. o Click on Import Table in the toolbar on the bottom right hand corner of the screen. o Click on the table that has the data that you want to scrape for e.g. as shown:
  59. 59. o Specify the path of the csv file where you want to import the data. o Click on Stop Recording and Save the task. o See how to create a task 2. Import CSV file to your proprietary application or database o The imported CSV file would look as shown:
  60. 60. o Once you have imported the data to a csv file, you can import the CSV file into your application or database for further processing. When you run this task it will extract the tabular data to a CSV file. Scrape Tabular Data From Web And Transfer It To Excel Task Description Scrape the tabular data from the web and transfer it to Excel. T58.atmx Solution 1. Record a new task o Click on Tools->Web Recorder
  61. 61. o Specify your website from where you want to scrape the tabular data. Click on Extract Table in the toolbar on the bottom right hand corner of the screen. o Click on the table that has the data that you want to scrape for e.g. as shown: o Specify the path of the CSV file where you want to import the data. o Click on Stop Recording and save the task. 2. Import data into Excel o To import the data extracted from the import table, into Excel based on certain conditions, you need to edit the recorded task. o Select the task in the Task List and click on Edit. o Insert Open Spreadsheet Excel command to open the excel file where you need to import the extracted data. You can find Excel command under Applications command category. o Insert a Loop for Each row in an Internet Explorer Table to process all the extracted rows. o Insert the condition based on which you want to filter the data. For e.g. the image below shows how to avoid importing products that includes AA Standard versions.
  62. 62. o Insert Set Cell excel command to set the extracted value in excel.
  63. 63. o Insert Go to Cell excel command to go to one cell right or down. o The final task will look as shown in Screenshot 4 3. How to run the task: o In case you do not have Automation Anywhere installed, please download and install it from, o Save T75.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Copy Data.xls under C: o Launch Automation Anywhere and from Task List select T75.atmx and click on RUN button to run the task. When you run this task it will extract the tabular data and import the data into Excel. Scrape Data From One Online System Task Description Transfer sales invoice data from one ERP application to another. This task can be very useful when you are upgrading or migrating your online systems. Using this task, you can automate data transfer of thousands of
  64. 64. records even if the structure of the two systems is different. T59.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solution 1. Prerequisites o The following example is recorded on sample web pages to illustrate how you can use Automation Anywhere to automate your data transfer from one online system to another. o Keep the sales invoice entry window open in both the ERP applications. Keep the first field as the current field in both windows. (see Screenshot 1 and Screenshot 2 ) Screenshot 1
  65. 65. Screenshot 2 2. Identify the mapping of the fields between the two ERP systems o Go to Tools->Variable Manager. o Create a variable called 'field_order' of type List. o Specify to read the values from a text file. o Specify the path of the text file as c:field_order.txt o Specify the order of the fields to be pasted in the text file. Field order is the number of the corresponding field in the destination ERP application where the data is to be pasted. For example, the data from VAT Amount is to be copied to the VAT Amount field in the destination application in which it is the 6th field and hence its field order is 6. Moreover, it is the 11th field in the source application. Hence, the 11th value in the list is 6.
  66. 66. 3. Create new task o Click Tools -> Task Editor. 4. Copy contents of a field in the source ERP application o Select Insert Keystrokes command and specify the keystrokes CTRL + C and TAB. This will copy the contents of the current field and move to the next field. 5. Transfer the sales records from one ERP system to another o Insert an if $field_order$ Not Equal To "0" command to prevent field data in the source application which does not have a corresponding field in the destination application, from being pasted. i.e. Due Date in one example o Insert if $field_order$ Equal To 2 command to insert a single TAB key before pasting the data of Invoice Date into the second field of the destination application. o Similarly, Insert as many if $field_order$ Equal To x commands as the number of fields to be transferred from the source application where x is the field order i.e. the field number where the copied data is to be pasted. o Select the Insert Keystrokes command to insert number of TAB keystrokes in the destination ERP application window depending on the field order. For example if we want to paste the data of Payment Mode then the field order for the same will be 9 in the destination application and hence we have to press TAB key 8 times if the contents are to be pasted in the 9th field. o Select Insert Keystrokes command after the endif of the 'if $field_order$ Not Equal To "0" command' and specify the keystrokes as CTRL + V. This will copy the contents of the current field in the corresponding field of the destination ERP. o Select the Insert Mouse Click command to click on the first field of the destination ERP application to make it currently selected. o Insert a Loop List Variable field_order command to repeat the above actions for each field in the source ERP application. o The complete task would look as shown in Screenshot 4
  67. 67. When you run this task, it will copy the contents of each field in the source ERP application and paste it into the destination application. It thus saves a lot of time that would otherwise be required to re-enter all the data into the destination application when you switch over from one ERP application to another one. Save Variables In A File And Use It Later In The Task Task Description Assign the values to variable while the task is running or save it to pass it to other tasks. T13.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks
  68. 68. Solutions 1. Create a variable o Go to Tools->Variable Manager and in 'User Variables' click on 'Add New Variable'. o Select a variable of type 'Value' and select the option 'Read from text file'. Specify the file from where you would like to read the values 2. Assign the values to variable at runtime o Let's say you want to assign the value of $Clipboard$ variable to other variable and use that value later in your task. o Use "Log to file" command to log the value of the $Clipboard$ variable and thus assign its value to the variable declared by you. o Specify the values for the variable in the format described in the "How to Use" section.
  69. 69. 3. Process the assigned values o Use this assigned value of the variable in conditional commands for further processing later in the task. o Refer to a sample task that compares two excel cells and does the processing based on the contents. You can create a variable to be read form text file. At runtime in the task, you can write the value of the variable in the format <variable>=<value>.
  70. 70. Assigning the values to variable comes in very handy when you want to compare data that is copied in the Clipboard one after another. Rename All Files In A Folder Task Description Loop through all the files in the selected folder and rename files with .xls extension by prefixing it with todays date. T02.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task o Click on Tools ->Task Editor. 2. Loop through folder o From the commands list select "Conditions / Loops -> Loop command. o In the "Start Loop" wizard, select Each file in a folder option and specify the folder name. o Save the command.
  71. 71. 3. Check if .xls extension o Select Conditions / Loops -> If command. o In the If wizard, select Variable option and select variable Extension (Click edit to select a variable). o Select Equal To operator and enter a fix value xls. o Save the command.
  72. 72. 4. Rename the file o Select Programs/Files/Windows ->Files/Folders Command. o Select Rename File(s) option in Files/Folder wizard and enter the path of the folder. Press F2 Key to select Filename, Extension, Day, Month and Year System Variables and enter them as shown. o Save the command. o If needed adjust the Rename File(s) command between the If command using Up/Down buttons on the Toolbar.
  73. 73. When you run this task, it loops through all the files in the selected folder and rename files with .xls extension by prefixing it with Todays date. This tutorial demonstrates use of one of very useful command wizard, 'Loop through each file in a
  74. 74. folder'. Use this when you want to perform actions on some or all files in a folder. This command makes it much easier because you don't need to know how many files there are in advance. In addition this tutorial demonstrates conditional commands, file related commands and ability to use system date and time variables. Read Variable Values From A Text File Task Description Read the variables from the text file and process them. T12.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks. Before executing the task make sure Microsoft Word is open. Solutions 1. Create a list Go to Tools->Variable Manager and in 'User Variables' click on 'Add New Variable'. Select a variable of type 'List' and select the option 'Read from text file' and specify the file from where you would like to read the values from. 2. Enter values in the text file Open the text file specified in Step 1. Specify the values for the variable in the format described in the "How to Use" section.
  75. 75. 3. Process the values read from the text file Use the variable in commands like any other variable. When you run this task, it reads the values from the text file. It is extremely useful when you have a huge list of values to process. Some applications like Excel export the data in comma separated values which is the format used by Automation Anywhere. Reading variables from text file can be very useful in exporting and importing a very big list of values. Print All Word Documents From A Folder Task Description Print all Word Documents from a folder. T09.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions You can perform this task easily using the File/Folder command.
  76. 76. 1. Create new task Click Tools -> Task Editor. 2. Print all Word Documents o Select Programs/Files/Windows category o Double-click on Files/Folders command o Select the option 'Print File(s) in a folder o Specify the folder name from where you want to print all the Word Documents. o Specify the filter as (*.doc) o Save the command o Save the task
  77. 77. When you run the task, it will print all the Word Documents from the folder specified using the default printer. Similarly you can specify multiple filters to select the different type of the files you want to print. If you want to print all the files then you can leave the filters box empty Migrate_Export Data From Database To CSV Task Description Query the database and transfer that data to CSV file. T18.atmx T18MyDB.mdb Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Open Task Editor to create a new task o Click on New -> Task Editor 2. Connect to the database o Using 'Database:Connect' command, specify the connection string to connect to the source Database with Session Name, Default. Connect to '<database connection string>' Session: 'Default'. Connect to '<database connection string>.
  78. 78. 3. Get data from the database and Export it to CSV o Double click Database command from the Application category, select SQL Query Option and specify a Select SQL Statement using 'Default' session. o Enable option, Export Data to CSV and in File Path field specify the CSV file path. 4. How to run the task:
  79. 79. o In case you do not have Automation Anywhere installed, please download and install it from, o Save T19.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Save T19MyDB.mdb under C:. o Launch Automation Anywhere and from Task List select T19.atmx and click on RUN button to run the task. When you run this task, it reads the data from source database and exports it into C:OrderMaster.csv file. Migrate Data From Excel To Database Task Description Migrate data from Excel to Access database. T55.atmx MyExcel.xls T55MyDB.mdb Note: Save the xls in C: drive, the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solution 1. Open Task Editor to create a new task o Click on New -> Task Editor 2. Get data from Excel o Using Excel:Open Spreadsheet command, open excel file containing data. You can find Excel command under Applications command category. o Use Get Multiple Cells option of Excel command to get the range of data you need to transfer. Specify the range as shown:
  80. 80. 3. Connect to the database and import the data o Using 'Database:Connect' command, specify the connection string to connect to the Database with Session Name, Default. o When you have retrieved a range of cells from Excel using Excel -> Get Cells - > Get Multiple Cells, the rows and columns of the range are stored in the system variable $Excel Column (index)$, which you can use in Loop for each row in an Excel Dataset. Insert Loop for each row in an Excel Dataset command from Conditions/Loops command category. o Double click Database command from the Application category, select Insert/Update/Delete Option and specify Insert SQL Statement to insert the data from Excel Dataset into OrderMaster table.
  81. 81. 4. How to run the task: o In case you do not have Automation Anywhere installed, please download and install it from, o Save T55.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Save MyExcel.xls and T55MyDB.mdb under C:.. o Launch Automation Anywhere and from Task List select T69.atmx and click on RUN button to run the task.
  82. 82. When you run this task, it connects to the source database, copies the excel records, with insert query in loop it will add all the records to destination table in the database. This tutorial demonstrates use of one of the very powerful features of Automation Anywhere, 'Database' applications. Use this when you want to migrate large numbers of records from excel or other applications to any database. Import Data From Excel To Access Task Description Import data from Excel to Access. The same example can be used to copy to any other application or web page. T05.atmx Book1.xls Note: Save the xls in C: drive, the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create a new task Click on New -> Task Editor 2. Open Spreadsheet o Using the Excel command select the 'Open Spreadsheet' option. o Enter the session name and path of the excel sheet to open.
  83. 83. 3. Connect to database Using the Database action and selecting Connect option specify the path of the database to connect to.
  84. 84. 4. Insert Excel commands o Select the 'Get Cells' option o Further select 'Get Multiple Cells' option o Specify the cell name from which data is to be copied in the 'From' field. o Specify the cell name to which data is to be copied in the 'To' field
  85. 85. 5. Loop through all the rows of dataset o Using the Loop command and selecting "Each row in Excel Dataset" option, you can Loop through each row.
  86. 86. 6. Specify Insert/Update/Delete Statement to copy data o Using the Database action and selecting Insert/Update/Delete option specify an insert query. o Execute SQL statement: insert into Table1 values('$Excel Column(1)$',$Excel Column(2)$)
  87. 87. 7. Close Spreadsheet and database connection o Enter close spreadsheet command o Enter disconnect database command o Save the task
  88. 88. When you run this task, it will copy your excel records to access file. To copy to Excel from Any Windows application just follow the same process. Import Csv File Task Description Import csv file and insert values in database. T16.atmx myCSV.csv myDB.mdb Solution To see how the task runs in Automation Anywhere, download the files. 1. Open Task Editor to create a new task o Click on New->Task Editor 2. Connect to the database o Using 'Database' command, specify the connection string to connect Access database with Session Name, 'database'.
  89. 89. 3. Import the csv file o Double Click the 'Read From CSV/Text' command found under Applications command category. o Select CSV option and specify the path of CSV file that you want to import. o Use Default session. You can also specify any other session name here.
  90. 90. 4. Process CSV File o Let's process the values of CSV file one by one. o All the values of the CSV file in one line will be read in Loop for Each row in a CSV.Text File. o In the loop we have insert SQL statement which inserts each read value into the database,
  91. 91. 5. How to run the task: o In case you do not have Automation Anywhere installed, please download and install it from, o Save T16.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Save MyCSV.csv and MyDB.mdb under C:. o Launch Automation Anywhere and from Task List select T16.atmx and click on RUN button to run the task.
  92. 92. When you run this task, it will extract the required data (unstructured) from the web page into CSV file. Format All Word Documents In A Folder Task Description This task automates formatting all Word documents in a folder (Times New Roman, Justify, Sentence Case etc.). T30.atmx Note: Save the .atmx file in My Documents> Automation Anywhere> Automation Anywhere> My Tasks Solutions 1. Create a new task o Click on New -> Task Editor. 2. Loop through all the files in a folder o Select Start Loop in Conditions/Loops category. o Select Files for folder option.
  93. 93. 3. Select only document Files o Under Conditions / Loops category, double-click on If command. o Select the option Variable o Click on Edit button o From the first drop down box select the System variable name Extension o Select the Operator 'Equals' o In the File option specify the value 'doc'
  94. 94. 4. Open a document o Under Program/Files/Windows category, double-click on Program/Files command o In Program/File path specify the value '$CurrentDirectory$$FileName$.$Extension$' o Open "$CurrentDirectory$$FileName$.$Extension$"
  95. 95. 5. Apply formatting to the document o Insert keystrokes in the documents to select all the contents of the document. 6. Double click on Manage windows command o Select the Microsoft word window, put the wild card * before and after Microsoft Word o Click on recording button and start recording of actions.
  96. 96. 7. Click on Format menu o Select the option Click item by text o In the text write the name of menu on which you want to click here, we write Font...
  97. 97. 8. Capture Font list box o Select the option Select item by text o In the text write the name of item which you want to select. Here we write Times New Roman
  98. 98. 9. Capture OK button of the font window. o Select the option Click Similarly record all the actions required to format all word documents.
  99. 99. When you run this task, it loops through all the documents of a folder and formats them. Find Broken Web Links Task Description Test all links in your website Download file from the Internet. You can schedule this task to routinely download virus updates, stock data or any other information. T44.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Select the template o Click on New->Template o Select 'Find Broken Web Links' template.
  100. 100. o Specify the URL you want to test and specify the CSV filename to store the result. When you run this task, it will test all the links on one web page at a time and log the results to the CSV file you provided. Extract Stock Data From A Web Page Task Description
  101. 101. Monitor the opening and closing prices of your stock portfolio and email them. This sample task uses an example from finance.yahoo.com just for illustrative purposes. T45.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Record a new task o Click on Tools->Web Recorder. o Enter the starting URL for e.g. finance.yahoo.com o Type in the stock quote for e.g. MSFT and click on GO. 2. Extract the prices of your stocks o Click on 'Extract Data' button from the toolbar in the bottom right-corner and click on the open or closing price of your first stock. o You can save the extracted data into any user variable say $ClosingPrice$ or $OpeningPrice$.
  102. 102. o Do the same for all the data you need to extract. o Stop the Recording and Save it. 3. Create Stock Quotes List o Open the recorded task in Task Editor from Tools-> Task Editor.
  103. 103. o Open Variable Manager tab located on right side of editor. o Double-click on my-list-variable and add the list of stock quotes o Save the list by clicking on Save button in Edit Variable dialog. 4. Edit your task to get prices for list of stock quotes and log them in a text file o Insert Loop for List Variable my-list-variable and place the commands that extract the prices into this loop block. You can find loop command under Conditions/Loop command category. o Double click on command that types the stock quote value and replace the actual value i.e. MSFT with variable, $my-list-variable$ and save the command.
  104. 104. o Insert Log to file command to log opening and closing price of each stock quote. You can find Log to file command under Program/Files/Windows command category. 5. Email the extracted prices o Insert a Send E-mail command that sends the text file holding the opening and closing prices of the stocks as an attachment. You can find Send Email command under Internet command category.
  105. 105. . o See the entire task in Task Editor
  106. 106. 6. Schedule the task o Select the task in the main Automation Anywhere window and click on Schedule Tab. o Specify the schedule options such that your task runs Daily before the stock market opens and after it closes. 7. How to run the task: o In case you do not have Automation Anywhere installed, please download and install it from, o Save T59.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks o Copy Data.xls under C: o Launch Automation Anywhere and from Task List select T59.atmx and click on RUN button to run the task. When you run this task, it launches the website finance.yahoo.com, extracts the opening and closing prices for list of stock quotes and emails them. Extract Restaurant Data From A Website Task Description Let's say you are in a restaurant business and you want to regularly find out all the restaurant businesses in your area. Note: This sample task uses an example of http://local.yahoo.com/ just for illustrative purposes. T52.atmx
  107. 107. Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solution 1. Record a new task o Click on Web Record link. o Specify the website http://local.yahoo.com/ and click on Start button. o Type in "Restaurants" in the Find Business Name textbox. o Specify the location for e.g. San Diego, CA o Click on Search Local button. 2. Extract all restaurant businesses in your area using 'Extract Multiple Data' wizard o When the resulting webpage is loaded, click on 'Extract Data' button in the Web Recorder toolbar. o From Extract Data Option window, select 'Pattern Based Data' option and click on 'Next' button to start 'Extract Multiple Data' wizard. o Step1 of wizard is to select the fields you need to extract. Click on 'Add' button and capture the field you need to extract say for e.g. name of restaurant. You will be presented with a small window having 'Capture' button. Click on that 'Capture' button to capture another instance of same field in order to match the pattern. Specify the Column Name and the action in 'Extract Data Field' window. Similarly, add number of fields you want to extract data from. For e.g. Name, Address and Phone number.
  108. 108. o After you captured all the fields, click on 'Next' link. In Step2, you can specify if data is in multiple pages and using 'Capture' button capture the button or link that loads the next page. Click on Next button.
  109. 109. o In Step3, specify the name and path of CSV file, where you need to save the extracted data. You can view the data using 'Preview Data' button. Eventually, click on Finish button to complete the wizard. o Stop the recording and save the task.
  110. 110. 3. How to run the task o In case you do not have Automation Anywhere installed, please download and install it from, . o Save T66.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks. o Launch Automation Anywhere and from Task List select T66.atmx and click on RUN button to run the task.
  111. 111. When you run this task, it extracts information about all the restaurants in your area. Extract Data From A Web Page Task Description Extract tabular data from any web page. For example we will be extracting all sample tasks and their description from Automation Anywhere Website. T42.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create a new task o Click on New - > Task Editor 2. Capture the table o Under Internet category double click on Web Recorder command. o Select the command Extract Table. Enter the website link which contains the tabular data (for e.g. http://www.automationanywhere.com/support/examples.htm) and click on launch.
  112. 112. o After the web page is loaded, click on capture button. A yellow tip appears with the text "Please click on the table you want to capture." In the webpage, click on the table you want to import. 3. Save the table data to .csv file o Once the table is captured, specify a valid path and a file name with .CSV extension and click on Save. Screenshot 2 o You can now open the .CSV file in Excel or many other programs. 4. Transfer all table date to another application (Optional)
  113. 113. Above steps gets all the data in .CSV file but alternatively you can get the web data one by one in loop and perform additional actions on it. Let's say you want to dig into the links listed and get the data from details webpage and put them in a notepad or text file (for simplicity) in specific format.  Under the Conditions /Loops command category, double click on Loop command. Select the option "Each row in an Internet Explorer Table" and click on Save.  Inside loop, insert Manage Web Controls Web Recorder command to click on link in particular column for e.g. Table Column(2) in this case. Just double click on Web Recorder command, select Manage Web Controls option, specify the URL, click on Launch button and capture the first link in the list using Capture button. Click on Advanced View and replace the actual Caption with system variable, Table Column(2). You can hit F2 to select the variable.
  114. 114.  Insert Extract Data command to capture the data from details page. Double click on Web Recorder command, select Extract Data option, specify the URL, click on Launch button and capture the data you want to extract. You can store the extracted data into any user variable by selecting the variable from drop-down in Step2 of Extract Data command.
  115. 115.  To save the data in a text file, from Programs/Files/Windows command category, double click on Log to File command. Specify the path of text file in Log File textbox. Select the variable you want to save using F2 Key.
  116. 116.  Insert Go Back web recorder command to return to main page having list of links. Note: To have proper spacing, insert a tab between each column. Keystrokes: $Table Column(1)$[TAB]$Table Column(2)$[ENTER] in "Untitled - Notepad" 2. How to run the task: 1. In case you do not have Automation Anywhere installed, please download and install it from, 2. Save T56.atmx under location, My DocumentsAutomation AnywhereAutomation AnywhereMy Tasks 3. Launch Automation Anywhere and from Task List select T56.atmx and click on RUN button to run the task.
  117. 117. When you run this task, it launches the website and gets all data in CSV file or optionally it loops through all the rows and columns of the table to get into the link on main page and extract the data from details webpage to print it in a notepad. Screenshot 1 Note: You can also use the pre-defined Template 'Extract Tabular Data from a Web page' Extract Competitor's Price List Task Description Extract competitor's price list regularly and stay ahead of the competition. Note: Let's say you are a LG dealer and you want to regularly check the LCD monitors prices that your competition is providing. In this sample task we are using an example of LG LCD monitors just for illustrative purposes. T46.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions You can extract competitor's price list from their web page using Web Recorder feature 1. Record a new task o Click on Tools->Web Recorder. o Type in the http://www.shopbot.com.au/~lg and click on Start o Click on LCD Monitors. 2. Extract the price list and save them to a .csv file o Click on the 'Extract Table' button from the bottom right corner toolbar. o Click on the pricing table that appears on the LCD Monitors web page. o Save the price list to a csv file.
  118. 118. o Stop the recording and save the task. Note: You can create multiple similar tasks to get information from multiple competitors. 3. Share the .csv file with your team o You can either save the .csv file on a shared folder OR o Record or Insert Keystroke/Mouse Click actions at the end of your task that attaches the .csv file to your Email client like Microsoft Outlook or Microsoft Outlook Express and sends email to the team. When you run the task it generates a .csv file. When you open the .csv file in Excel. 4. Schedule the task o Select the task in the main Automation Anywhere window and click on Schedule Tab. o Specify the schedule options such that your task runs once a week so that you are up-to-date with the competition.
  119. 119. When you run this task, it launches the website, extracts the price list, saves them to a csv file and emails the csv file. Email Automation - Reply To Job Applicants Based On Post Applied Task Description Using email automation to get all unread messages from the server for an id to collect mails for job application and reply them with attachments based on post they applied. T72.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks. Solutions 1. Create new task o Click Tools -> Task Editor. 2. Loop for all messages on server o Click on Email Automation -> Get All Messages command. o Select status. Select All to get all messages. Select 'Read to get only read messages and select Unread to get only unread messages. o Enter the server details like hostname, user id and password. o Select message format either HTML or Plaintext. o Specify a folder to save the attachment.
  120. 120. o Save the command. 3. Send mail with requirement details o Insert If Variable command, to check the value of $Email Subject$ variable if it contains the verb Sales Manager.
  121. 121. o Insert Send Mail command to send the mail to user, if the above condition is true.
  122. 122. o Insert your user id in from text box. o In to text box, insert the variable $Email From$. o Insert Re: $Email Subject$ in Subject. o Attach requirement details and application form for post of Sales Manager and in Message write description of attachments. o Save the command. o Repeat above steps to send the mails for post of Production Manager and Technical Leader.
  123. 123. When you run this task, it loops through the emails based on Email subject for post applied and sends a reply email with job requirements detail as attachment back to the candidate. Download Updated Web Images Of Weather Maps Task Description Let's say you want to present the progression of weather system over a period of time. This task downloads the updated web images of weather maps at regular intervals. T53.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solution 1. Create new task o Click on Tools->Web Recorder 2. Double click on Web Recorder command o Select the option Download File o Enter the path of the image url http://icons-pe.wunderground.com/data/640x480/2xas_st.gif. o Enter the path at which you want to store the image. o Here, we give the path C:WeatherInformation $Day$.$Month$.$Year$_$Hour$.$Minute$.$Second$.gif. So, we can find the time stamp of the image.
  124. 124. 3. Schedule the task o Using the schedule property of Automation Anywhere, you can schedule this task to run every few minutes so that you have the updated web images of the weather maps. When you run this task, it right-clicks the weather map image and saves it to the folder with latest time- stamp. Download A File From The Internet Task Description Download file from the Internet. You can schedule this task to routinely download virus updates, stock data or any other information. T43.atmx
  125. 125. Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create a new task o Click on New->Task Editor. o Double click on Internet ->Web Recorder command o Select Download File option. Specify the File URL from where you want to download file and File name to save in local folder. When you run this task, it download file from internet to a local folder. This tutorial demonstrates use of 'Download File' command in Automation Anywhere. Delete Rows From Excel Spreadsheet Based On Specific Criterion
  126. 126. Task Description Automation Anywhere provides easy Excel Automation. For more information see Excel Automation Solution. This examples shows how to delete rows from an Excel sheet if the cell contains a specific word. Solutions To see how the task runs in Automation Anywhere, download the files. T28.atmx Delete-Rows.xls Note: Save the xls in C: drive, the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Below are the steps that make the Task: 1. Create a new task o Click on New -> Task Editor 2. Open Excel file o From Application Category->Excel, Select 'Open Spreadsheet' option
  127. 127. 3. Create Variable o Click on Tools -> Variable Manager. Create variable Cell1 of type "value". 4. Loop through all the rows until the word 'STOP' is found o Insert Loop for variable "Cell1" not equal to "STOP". 5. IF Command
  128. 128. o Insert If command to compare value of variable to specified criteria (For this task specified criteria is 'automation') 6. Delete the row if the criteria matches o If Criteria matches delete the entire row o Excel: Delete Active Cell with option entire row 7. Close Spreadsheet o Insert the Close spreadsheet command. o Uncheck the 'Do not save the changes' checkbox to save changes. When you run this task, it loops through all the cells in the first column in excel sheet until word 'STOP' is found. If it matches criteria given by user then it will delete that particular row from excel sheet. Note: You can run this task on any column. Simply keep the cell in that column selected before you run the task. Delete Duplicate Excel Rows Task Description Automation Anywhere provides easy Excel Automation. For more information see Excel Automation Solution. This example shows how to sort the data in Excel sheet and delete duplicate entries, if any.
  129. 129. Solutions To see how the task runs in Automation Anywhere, download the files. T29.atmx TestData.xls Note: Save the xls in C: drive, the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Below are the steps that make the Task: 1. Define Variables o Go to Variable Manager and create variables "C1", "C2", "N1" and "N2" 2. Create new task o Click on New->Task Editor. 3. Open Excel sheet o From Application Category->Excel, Select 'Open Spreadsheet' option. 4. Sort data in Excel sheet o Insert Keystroke command to sort data in Excel sheet. Keystrokes: [CTRL DOWN]a[CTRL UP] in "Microsoft Excel - TestData.xls" Keystrokes: [ALT DOWN]d[ALT UP] in "Microsoft Excel - TestData.xls" Keystrokes: s in "Microsoft Excel - TestData.xls" Keystrokes: [ENTER] in "Sort" 5. Go through all the cells until word 'STOP' found o Insert Loop for variable "Clipboard" not equal to "STOP".
  130. 130. 6. Retrieve value of 1st cell o Insert Excel command to get the value of the first cell 7. Check for duplicate value o Insert a Loop to check value for currently active cell is equal to that stored in the variable "C1" o Loop While $N1$ Equal To $C1$ 8. Check if condition is satisfied o i.e. Current active cell (C1) is equal to next active cell (N1) in line 1 and current active cell (C2) is equal to next active cell (N2) in line 2 and so on. If $n1$ Equal To $c1$ Then If $n2$ Equal To $c2$ Then 9. Delete the duplicate row Insert Excel command to delete entire row Excel: Delete Active Cell with option entire row. If duplicate row is not found, go to the next cell in the row below. Excel: Go to one cell below the active cell.
  131. 131. When you run this task, it will sort the data in an excel sheet. Then it will loop through each cell in first column until word 'STOP' is found and will delete duplicate entries from the first column.
  132. 132. Delete And Move Files Task Description Delete all .txt files in a folder and move all .doc files from that folder into another folder. T07.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task Click Tools -> Task Editor. 2. Delete all txt files Select "Files/Folders->Delete File(s)" command. Insert the Path of the Folder in the Input box (e.g. "C:My Folder*.txt"). Save the Command. 3. Copy .doc files Select "Files/Folders->Copy File(s)" command. Insert the Path of the Source Folder in the first Input box (e.g. "C:My Folder*.doc"). Insert the Path of Destination Folder in the second Input box (e.g. "C:New Folder"). Save the Command. 4. Delete .doc files Select "Files/Folders->Delete File(s)" command. Insert the Path of the Folder in the Input box (e.g. "C:My Folder*.doc") from where files are to be Deleted. Save the Command. When you run this task, it will delete the .txt files and move the .doc files from source to the destination folder.
  133. 133. Delete All Empty Files From A Folder Task Description Delete all files which are empty i.e. with size 0 KB. T33.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create New Task o Click on New-> Task Editor. 2. Delete files whose size is 0 KB o From the Program/Files/Windows category, select Files/Folders command. In the Files/Folders interface click on Delete File(s) option. Specify the path from which you want to delete all the files. o Delete Files "C:MyFolder*.*" if file size is exact 0 KB o Click on the "Advance View >>" button and then click on size. From the list select exact and specify the size as 0 in the KB textbox. When you run this task, it checks the size of all the files in a folder, and deletes the files that are 0 KB in size.
  134. 134. Create Folders In Network Drive And Backup Data Task Description Daily create folders in network drive for users, prefix those folders with todays date and backup files from a local folder to those folders. T03.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create user list o Create List Variable from Tools Menu > Variable Manager. o Make sure User Variables tab is selected. Click New and in 'Type' selection select List o Type user names. Give an appropriate name to List Variable (say MyUsers) and save the List Variable. 2. Create new task Click on Tools -> Task Editor.
  135. 135. 3. Loop through user list & create folder for each user o From the command list select "Loop->Start Loop command. o In the "Loop" wizard, select List Variable option and select the newly created List Variable. o Select Programs/Files/Windows->Files/Folders Command. Select Create Folder option and select the parent folder. Press F2 Key to enter the List Variable created above and also add System Date variables as prefix. 4. Loop through user list and copy files o You can create another loop command like above and select Programs/Files/Windows- >Files/Folders command wizard. Choose Copy File(s) option in Files/Folder wizard. o Select or enter the path of the source folder from where the files are to be copied. In destination folder enter the parent folder of our newly created folders. Using F2 Key enter the List Variable and System Variables for todays date. Save the command.
  136. 136. When you run this task, it will create new folders in your given drive and backup data from your local folders to these newly created folders. Create An Application That Takes Order Information And Inserts Into Database Task Description Create an application that asks user for order information and insert it into database. Typically creating a simple application like this and deploying it takes quite a bit of time. With Automation Anywhere you can do it within few minutes. T19.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create a new task Click on New -> Task Editor 2. Connect to the database Using the Database command from the Application category, specify a connection string to connect to the Database. Connect to '<database connection string>' 3. Prompt the user for values Using the Prompt Command from the Keystrokes/Mouse category, Insert a prompt to prompt users for values for a particular column in the database, and assign it to a variable. Prompt Message : "Enter OrderNo" 4. Specify a INSERT Query Using the Database command from the Application category select, "Insert/Update/Delete" Option. Specify the Insert Statement in the textbox given. Execute SQL Statement: Insert into OrderMaster Values($Value1$,'$Value2$','$Value3$',$Value4$,$Value5$)
  137. 137. $Value1$ to $Value5$: They are variables which have the values, accepted by the user using the Prompt command. 5. Disconnect the Database Using the Database command from the Application category select "Disconnect" Option. 6. (Optional) Create Exe and deploy the application on many machines* *Applicable to Enterprise edition version 9.0.2 and less If you want to install this application on many machines, you can easily do it without installing Automation Anywhere on all machines. With Automation Anywhere - Premier version you can easily convert this task to Exe. These exes are standalone programs and don't need Automation Anywhere installed. You can copy the exe on other machines or network drive and many users can use it.
  138. 138. When you run this task, it connects to the database, prompts the user to enter values for order information and inserts the respective values in the Database Table. Compare Two Columns In Excel Task Description Automation Anywhere provides easy Excel Automation.This example shows how to compare two columns in an Excel sheet. Solutions To see how the task runs in Automation Anywhere, download the files. T22.atmx Compare-Values.xls Note: Save the xls in C: drive, the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Below are the steps that make the Task: 1. Open an Excel sheet From Application Category->Excel, Select 'Open Spreadsheet' option 2. Create Variable Click on Tools -> Variable Manager. Create variable Cell1 and Cell2 of type "value".
  139. 139. 3. Insert Loop command Insert loop command for option Times. Specify the number of rows to compare 4. Compare Cells o All of the following commands need to be entered within the Loop o Excel : Get value of Active cell and assign to variable "Cell1" Excel : Go to one cell right of active cell Excel : Get value of Active cell and assign to variable "Cell2" Excel : Go to one cell right of active cell
  140. 140. o Compare Cell1 and Cell2 variables and based on the comparison results perform the required task. o Go to next row in the Excel document.
  141. 141. When you run this task, it compares two Excel columns. Check If Backup Process Is Over Task Description Check if backup process has finished System Backup. T17.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Check if backup process is going on o Click New->Task Editor. o Select the Loop command from the Conditions / Loops category. o Select "Start Loop".
  142. 142. o Select the 'Condition' option o From the list of conditions, select the 'Window Exists' option and specify the Window title of your backup application. o You can put a delay of 10 seconds within the loop so that way it will check for condition after every 10 seconds. Loop While Window Exists("Backup Progress") Comment: Backup is in progress... Comment: Wait for 10 seconds. Delay: (10000 ms) End Loop When you run this task, it checks whether <window title> exists or not. It keeps on executing loop command till it finds <window title>. If it does not find the window title, it stops executing the commands within loop & executes commands after End loop. This tutorial demonstrates use of 'Loop' & 'If conditions' together which makes it so powerful to solve complex problems. With loop you can use any other condition like 'File exists', 'File does not exist', 'Folder exists', 'Folder does not exist', 'Application running', 'Application not running', 'Ping successful', 'Ping unsuccessful'. You can also use variable in creating conditional Loop structure. Call VBScripts_JScripts From Automation Anywhere Task Description Loops through all the files of a folder and pass each filename as parameter to a VBScript and assigns the return value to a variable. T26.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks
  143. 143. Solutions 1. Create new task Click on New -> Task Editor. 2. Loop through all the files. o Select 'Loop for each file in a folder' command from Loop command o Specify the path of the folder from where you want to pass all the files as a parameter to the VBScript. 3. Call VBScript within the Loop o Call VBScript within the Loop and pass the following System variables as a parameter to the script and assigns a return value to the variable. o Parameter: $CurrentDirectory$$FileName$.$Extension$ o Return: $vb_return$
  144. 144. When you run this task, it loops through all the files of a folder and passes every file as a parameter to the VBScript and assigns a return value to the variable and shows a prompt message. Broadcast Message To All Users On The Network Task Description Create a task that will broadcast message to all users on the network. T36.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task o Click New ->Task Editor. 2. Prompt for the message to broadcast o From Keystrokes/Mouse category, insert a Prompt command. o Check the box to assign the prompt value to a variable.
  145. 145. 3. Broadcast the message o Insert keystroke command to broadcast the message. Keystrokes: net send * $msg$[ENTER] in "Run" When you run this task, it sends message to all users of your workgroup. Backup Your Daily Work Into A Zip File Task Description
  146. 146. Backup your work every day into a zip file with unique name. T24.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task o Click on Tools->Task Editor. 2. Backup your work o Select category Programs/Files/Windows o Double-click on Files/Folders o Select Zip File option o Specify the path of the folder you want to backup. o Specify the name of the Zip file. Enter the system variable with Today's date so that every day it creates a unique file.
  147. 147. When you run this task it will zip your folder or file(s) at your specified location. Automation Application Testing And Validation Using Image Recognition
  148. 148. Task Description Create a task that will automate testing and validation in an application by using image recognition. Optionally it can prompt user for the values to input. For this task we are testing our application 'Launch-n- Go'. To see how the task runs in Automation Anywhere, download the file. T68.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Record the task o For the purpose of this test we will add a keyword in Launch-n-Go. o Press 'Record' in the Automation Anywhere to start recording. o Record adding a keyword process in the application as you would. o Stop the recording and save the task. 2. Optionally prompt user for a keyword
  149. 149. o Open the task in task editor by clicking 'Edit'. o Identify the action where you typed in the keystroke for 'Keyword' and 'Document/Program'. Click Actions button and select 'Convert to Prompt'. In case of 'Keyword' assigned the prompted value to the variable 'Prompt-Assignment'. o Specify custom prompt message "Enter keyword" and "Enter program/keyword". o Save the task. 3. Check if the keyword already exists o Here we will use Image recognition to check if keyword already exists. Use If condition with Image recognition to see if keyword already exist. o If the above condition is satisfied then again using IF condition(2) with Image Recognition option, find the command button 'No' and click on it. Insert a 'Log to file' command to log that the keyword already exists. o If the condition(1) is not satisfied then insert a 'Log to file' command to log that the keyword has been successfully added. 4. Perform the above steps for 'n' number of times  Insert a 'Times' loop around the recorded actions to allow adding 'n' number of keywords.  Insert an IF condition after the 'Prompt' command for the keyword, to check whether the 'Prompt- Assignment' variable to which the value input for the keyword has been assigned, has a null value. If the condition is satisfied then exit the loop.
  150. 150. When you run this task, it will prompt the user for a keyword and document/program. If the information entered is already existing then the task will check whether the window with the appropriate message is displayed and also click on the command button 'No' so that the keyword is not overwritten. Automating Sales-Order Process With Workflow Designer Task Description Graphically represent the chain of tasks to automate Sales-Order process using the intuitive Workflow Designer. In this workflow we represent graphically Sales-Order process from downloading order details from the web, processing the order to create invoices, printing invoices, database backup and email notifications. Solutions
  151. 151. 1. Create a new workflow o Click on Workflow Designer from the main Automation Anywhere window. o Drag 'Start' command from Toolkit to the right window 2. Design Workflow o Drag the 'Run' command from the Toolkit o Enter the Run Task parameters. For the purposes of this example, we run a task to extract sales order details from the web.
  152. 152. o Once the data is downloaded from the web, run the task to process invoices based on the downloaded sales order data. o IF invoice 'File Exists' then run the task to print the invoices.
  153. 153. o If due to some error invoices cannot be processed, the Backup Database task is run to ensure that no information is lost.
  154. 154. o If for some reason the above Backup Database task is unsuccessful, send email notification to the concerned persons. o The complete workflow for Sales-Order process is shown When you run this workflow, it downloads sales-order details from the web and process invoices. Based on that it takes further appropriate actions.
  155. 155. Automating Inventory Management With Workflow Designer Automating Inventory Management with Workflow Designer Task Description Graphically represent the chain of tasks to automate Inventory Management using the intuitive Workflow Designer. In this workflow we represent graphically Inventory Management from checking inventory, placing order if below set inventory levels and sending email notifications. Solutions 1. Create a new workflow o Click on Workflow Designer from the main Automation Anywhere window. o Drag 'Start' command from Toolkit to the right window 2. Design Workflow o Drag the 'Run' command from the Toolkit
  156. 156. o Enter the Run Task parameters. For the purposes of this example, we run a task to check inventory levels as shown in Screenshot. A text file will be created for all items for which inventory is less than or equal to re-order levels. o Check for existence of the text file 'Items to Order'. IF file exists then run the task to place order.
  157. 157. o If for some reason the above place order task is unsuccessful, send email notification to the concerned persons.
  158. 158. o The complete workflow for Inventory Management is shown below. When you run this workflow, it checks the inventory levels with re-order levels and creates a text file for all items less than or equal to re-order levels. Based on that it takes further appropriate actions.
  159. 159. Automatically Schedule Retrieval Of Data From Database Task Description Create a task that will retrieve data monthly from database and store in Excel Sheet. T70.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create a new task o Click on New->Task Editor 2. Connect to the database o Using the Database command from the Application category specify a connection string to connect to the Database. o Connect to '<database connection string>'. 3. Specify a SQL Query to get the last month's records from database. o Using the Database command from the Application category and selecting SQL Query Option specify a SQL Query o Select * from CustomerData where Month(PurDate) = Month(Now)-1 o The complete task would look as shown
  160. 160. 4. Specify commands which save records of last month in excel file.  Select Date format "mmmm,dd,yyyy" and extract month part from that using String Manipulation command, String Manipulation : "$Date$" and assign to : $LastMonth$ 5. o With the use of Keystroke commands & Loop command you get each row of the result returned by the query. And whole month's record is getting appended to Excel file. o Excel file would look as shown in Screenshot 2. 5. Schedule the task to store record of data monthly. o You can see schedule property in the main Automation anywhere window as shown
  161. 161. o Schedule this task to run at first day of every month and store the last month's database records in Excel file. The task is automated to run on the first of every month, while the previous month records are saved to an Excel file. Automated Test Data Generator Task Description To test your application, you often need large random data created in database. This example demonstrates how to use random variables to generate test data for testing. T10.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks. Before executing the task make sure Microsoft Access with a blank table is open. Solutions 1. Record a new task o Record a task that enters a value in one of the columns in your database for e.g. Microsoft Access 2. Create a random variable using the Tools->Variable Manager.
  162. 162. You can generate two types of random values in Automation Anywhere  String - Specify the length of random string you want to generate  Numbers - Specify the lower and upper range between which you want to generate random numbers. For e.g. to generate random numbers between 4 and 10 you would specify 4 in From and 10 in To. 3. Populate seed data in multiple columns Open the recorded task in Editor and put a loop of 100 around the keystroke action that enters the value in your database. Replace the recorded keystroke action with a random variable.
  163. 163. When you run this task, it will enter 100 random values in your table. You can change 100 to any other number and enter thousands of rows for testing purposes and save time creating those records in your database. Automated GUI Testing Task Description Record a script to perform a GUI testing of your application. The following example records and test various menu options in the notepad application. T20.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Record a new task Start recording a new task by clicking on 'Record' button. 2. Test the UI of your application The following example is recorded in a notepad window to illustrate how you can use Automation Anywhere to test any other application. o Open a notepad window o Navigate to different menu items like File->Open, File->Save As, File->Page Setup, Edit->Find, etc.
  164. 164. o Each menu item will open a new window for e.g. Edit->Replace will open a 'Replace' window. Record a click in the 'Replace' window by clicking on Cancel or OK button. o Automation Anywhere intelligently records your activities in all the different windows. Now when you play the task again, if any of the menu items are not working fine and does not open the expected window, Automation Anywhere will report an error. When you run this task, it opens a notepad window and goes through various menu items and clicks on Cancel/OK button of respective windows that open up. Automated FTP_SFTP Upload Task Description Upload files from a folder on FTP/SFTP server if file name contain today's date in it. T14a.atmx (Solution A) T14b.atmx (Solution B) Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks. Solutions You can upload files from a folder using the FTP feature provided by Automation Anywhere. See Solution - A. If you want to do the same with SFTP see Solution - B.
  165. 165. Solution A 1. Create a new task o Click on New -> Task Editor 2. Loop through all the files in a folder Insert a Loop command and select option 'Each file in a folder' and select folder name from where you want to upload the files. 3. Check if the filename has today's date in it. o Under Conditions / Loops category, double-click on If command o Select the option Variable o Click on Edit button o From the first drop down box select the System variable name FilenName o Select the Operator 'Includes' o In the Fix option specify the value $Day$-$Month$-$Year$ 4. Upload the files on FTP server o From the Internet Category double-click on FTP/SFTP command. o Insert a FTP/SFTP connect command to connect to your FTP server.
  166. 166. o Similarly insert a FTP/SFTP 'Put File' command to upload the qualifying files on FTP server. o To get the path of the entire file use the variables $CurrentDirectory$$FileName$.$Extension$ o Insert a FTP Disconnect command. Solution B 1. Create a new task o Click on New -> Task Editor 2. Loop through all the files in a folder o Insert a Loop command and select option 'Each file in a folder' o Select the folder name from where you want to upload the files. 3. Check if the extension of file is txt.
  167. 167. o Under Conditions / Loops category, double-click on If command. o Select the option Variable o Click on Edit button o From the first drop down box select the System variable name Extension o Select the Operator 'Equals To' o In the Fix option specify the value txt. 4. Upload the files on SFTP server o From the Internet Category double-click on FTP/SFTP command. o Insert a FTP/SFTP connect command to connect to your SFTP server. Select the Secure FTP option. o Similarly insert a FTP/SFTP 'Put File' command to upload the qualifying files on SFTP server. o To get the path of the entire file use the variables C:$FileName$.$Extension$ o Insert a FTP/SFTP Disconnect command. Solution A: When you run this task, it will loop through all the files of the folder specified by you. For each file it will check if the filename contains today's date and if it does then will upload the file on the FTP server specified. Solution B: When you run this task, it will loop through all the files of the folder specified by you. For each file it will check if the file is text file i.e. filename having .txt extension, and if it does then will upload the file on the SFTP server specified.
  168. 168. Automated FTP Download And Backup Task Description Download from FTP and backup on workstations. T15a.atmx (Solution A) T15b.atmx (Solution B) Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks. Solutions You can download and backup files on workstations using the FTP feature provided by Automation Anywhere. See Solution - A. If you want to do the same with SFTP see Solution - B. Solution A 1. Create a new task o Click on New -> Task Editor 2. Connect FTP o Select FTP/SFTP command from Internet category o Specify the server name, username and password.
  169. 169. 3. Download folder from FTP Specify the folder that you want to download from FTP server 4. Backup downloaded folder to a server o Using If Ping Successful command check if the machine is up or not. o If the machine is up then copy the downloaded folder to that machine. o Double click on Files/Folder in Program/Files/Windows. o Select Copy Folder and give appropriate source and destination folder name. o Double click on Log to File Program/Files/Windows. Select file and write appropriate file.
  170. 170. 5. Log errors If the machine is not up (using If Ping Unsuccessful command) then log the error to the log file. 6. Backup to another server Repeat the above steps for different workstations and disconnect from FTP.
  171. 171. Solution B 1. Create a new task o Click on New -> Task Editor 2. Connect SFTP o Select FTP/SFTP command from Internet category o Specify the server name, username and password. o Select Secure FTP option.
  172. 172. 3. Download folder from SFTP o Specify the folder that you want to download from SFTP server o Separate files according to modified date 4. Backup downloaded folder to a network machine o Using If Ping Successful command check if the machine is up or not. o If the machine is up then copy the downloaded folder to that machine. o Double click on Files/Folder in Program/Files/Windows. o Select Copy Folder and give appropriate source and destination folder name.
  173. 173. 5. Log errors If the machine is not up (using If Ping Unsuccessful command) then log the error to the log file. 6. Backup to another server Repeat the above steps for different workstations and disconnect from SFTP.
  174. 174. Solution A: When you run this task it will download specified folder and backup that folder on 2 different workstations if they are accessible. It will also log appropriate messages to a log file. Solution B: When you run this task it will download specified folder and according to its modified date separate files of that folder and backup that folder on other network machine if it is accessible. It will also log messages to a log file if network machine is not accessible. Automate Zip Task Description Zip all document of a folder that are two days old and email it as an attachment. T21.atmx Note: Save the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks Solutions 1. Create new task Click on New -> Task Editor.
  175. 175. 2. Copy all documents that are 2 days old o Using the Programs/Files/Windows category select Files/Folders command. o In the Files/Folders Interface select Copy Files(s) option. o In the Source File(s) with path select the path which contains the *.doc files. o In the Destination folder with path select the path were you want to copy all the *.doc files. 3. Zip the folder Copy Files "C:MyFolder*.doc" to "C:MyFolderMyZippedFiles" o Click on "Advance View >>" and select the Date box. From the list, select created date, and specify 2 in the box next to "in the last". o From the Program/Files/Windows category select Files/Folders command. o In the Files/Folders wizard select the Zip file(s) option.
  • SivaKumar468403

    Sep. 14, 2021
  • WenceslaoVirtucioIII

    Jun. 10, 2021
  • SaiRam438

    Dec. 19, 2020
  • DuyAnhMilano

    Jul. 1, 2020
  • KiranKanteti1

    Sep. 18, 2019
  • Joao_Mesquita

    Aug. 21, 2019
  • chemaij

    Jul. 19, 2019
  • poparadu756

    May. 31, 2019
  • SungBKim

    May. 27, 2019
  • WilianMartins9

    May. 9, 2019
  • CalinMitelea

    Apr. 26, 2019
  • sdasgarali

    Feb. 13, 2019
  • carrodeguasr

    Aug. 13, 2018
  • hoangnguyen1035

    Aug. 5, 2018
  • SalmanKS1

    Aug. 2, 2018
  • SubashAshok

    Jul. 27, 2018
  • ChristinaNguyen121

    Jul. 21, 2018
  • PauloHenriqueFrutuos

    Jul. 18, 2018
  • ssuser42c6fe

    Jul. 11, 2018
  • raviteja967

    Jul. 8, 2018

We will provide you these pdf materials as part of Automation anywhere training

Views

Total views

41,837

On Slideshare

0

From embeds

0

Number of embeds

6

Actions

Downloads

0

Shares

0

Comments

0

Likes

105

×