Questions Regarding UIPath Scripting

  1. How do I create activities to select items in a drop-down list? The field shows a default value and I want to select a different value. Currently it gives me an error on how it couldn’t find the element.

  2. When I scrape text from a web page, the UIPath selector highlights more than I want to scrape (and subsequently copy to an Excel cell). How do I make it only scrape a portion of the blue highlighted area it gives me? It allows me to encircle in red the number, but scrapes the whole thing:

  3. How do I create activities in a script where the script each month when it runs needs to adjust and accurately select dates in a pop-up calendar, and the dates would change each month? For example, the report prompts a between date (start/end date) with a pop-up calendar for each. each month it has to change forward by a month, identifying the start which would be the 1st of the month on the pop-up calendar, and the end date which would be the last calendar date of the month. Each subsequent month it needs to change to the next month. how do I script for this?

  4. How do we create activities in a script that allow for on the first script run to copy text in a range of Excel cells, save the Excel file, and then on the subsequent script run copy text to a separate range in the same Excel file?
    a. That is, I want to keep each script run’s pasted data to Excel in the same file, and don’t want to overwrite any previous scraped data from previous script runs.
    i. How do I create activities that make it know to advance to a separate range of cells each time ongoing into the future?

First of all these are lot of questions which should have gone to different topics to search. Anyways let me try -

Ans 1 - You can use a click activity to select Items from a dropdown or alternatively you can send hot keys to do the same here are some post what you should visit -

Ans 2 - You can use Get Text, Get Full Text, Get OCR text etc how ever after scrapping the data you will have to perform string manipulations on the result to get desired output. After this you can use Write Cell activity to write in a particular cell. Have a look here

https://studio.uipath.com/docs/output-or-screen-scraping-methods

Ans 3 - See this

Ans 4 - For this you can use write cell activity and in Excel Application scope checked a property Auto Save or you can explicitly use Save Workbook activity to save what you just write. If you write in different cells it will not overwrite. See these

In your questions I did not get this part

**How do I create activities that make it know to advance to a separate range of cells each time ongoing into the future?**

Hope rest above would help you

Thanks Prankurjoshi. Few more questions I have to help clarify further:

Ans1 - Tried Select Item, but it just isn’t able to locate the UI element of the field with the drop-down on the webpage. In the step just previously, I was able to do it successfully using an Anchorbase, but with this next field it won’t work.

Ans 2 - How do I “perform string manipulations”. e.g. it scrapes the following: “463 records found”; and I only want to keep the 463 for typing into a cell in Excel in the next step

Ans 4 - I get this, but what I mean is how do I advance it. e.g. 1st script run, it pastes into A1-D1 of the excel file; then 2nd script run I want it to paste to G1-K1 of the same excel file; then 3rd script run I want it to paste to N1-Q1 of the same excel file, and so on.