Trouble opening changing url

This program does a ton more then I need so this is likely a very basic and obvious answer but I have only used iMacros in the past but now requires paying in order to access local files.

I am trying to tell the program to open a url that pulls info from a csv file I have saved. This csv file contains the users id, name, and date I will post it below. Once that URL is loaded it clicks on a download button that pulls a csv and I am done.

I was able to get it to open the url with all the information prepopulated and to click on the download, I just can not figure out how to give it the URL and add the identifiers for a file.

This is what the URL looks like in iMacros URL GOTO={{!COL4}}&fromDate={{!COL1}}&toDate={{!COL2}}&callType=all&userName={{!COL3}}&returnToPage=callHistory&totalRecords=2000

Any help you can offer is greatly appreciated.


I don’t understand your question.

Was wondering if your message was actually legit and not only one malicious to trap people.
Looks like it may not be :slight_smile:


Ah sorry about that it indeed is legit. Nextiva is our phone provider, I use this to pull users call logs between a set period of time and download the CSV. I am pretty sure this should be fairly simple with this program but it so much more complex then what I was using before.

No problem, that’s on me. Looks like clicking the link requires authentication to go further so difficult to help you much the UIAutomation itself…

If you got some spare time, i would recommend you to go through the content of the UiPath academy which should give you in couple of hours some understanding around UIAutomation and the software itself and will surely get you started to proceed with your task


Florent thank you for the help so far I shall sign up and check that out because I definitely want to use this for more then just this use. In the case of the URL I can present another example so if I have site how would I be able to tell the program to use custom fields pulled from a CSV for each user, report, and date? In the example I provided the macro understands in advance to look in file X and when it does {{!COL1}} represents the first column in the CSV which is a date and {{!COL4}} is the ID. Now my URL starts to look like this instead

I also have it set to a loop so that it can do it for each user and it just goes down one row at a time. Hopefully I am not making this confusing because I am trying to get this report out today.

Might be hard to still do today (depending on timezone).

What you want is ReadCSV activtiy, store in DataTable.
Then loop and use Get Row Item (check the forums for xaml examples if needed). It will return the value from a specific column.
Or if you use ForEach loop use yourDataRowName.Field(Of String)(columnIndex), where columnIndex is a 0-based index of the column you want to fetch the data from.

Now for the url, if you have the browser opened already, you can use NavigateTo activity to go to the address.
You need to build it first.
Assuming first column (index = 0) is the fromDate, second (index = 1) is to date and fourth is ID (index = 3), it would go like this:
Declare the address template outside the loop (use full address of course):
string addressTemplate = https://...Detail?userId={0}&fromDate={1}&to{2}

Note the {0}, {1} and {2} tokens. They will be used in the String.Format call inside the loop.

Then in the loop:
string actualAddress = String.Format( addressTemplate, yourRow.Field(Of String)(3), yourRow.Field(Of String)(0), yourRow.Field(Of String)(1) )

This should get you on the right path.

Just remember that almost everything is 0-based in .Net, so that you don’t try to fetch an index that doesn’t exist.

1 Like