Open Browser with URL row(0).ToString or row ("Collumnname").ToString is not work

I am trying to build one simple project (Read Excel file and for each row, navigate to URL and after to open one txt file from the URL, get some information of this file and to write to one second Excel file).

In the Activity Open Browser, I am trying to get the url from Excel file using the expression row (“Collumnname”).ToString but I am receving the message “Row” is not declared It may be inaccessible due to its protection level".
Could you help me with this subject please?

thanks, Felipe

change row to CurrentRow(“Link”).tostring or change the ForEach value from CurrentRow to Row

Regards
David

1 Like

Hello David, I changed it (CurrentRow(“Link”).ToString) but the same error is happening.
Do you have any alternative for it? could you help me?

can you attach the sequence here?

Hi @Felipe_Sternberg
Make the row as CurrentRow
As in the new Updated For Each DataTable, they change the Row as CurrentRow.

Dude Y you are using open browser inside for each keep it in out from the for each let give example i want to search different data like today covid 19 result and weather report

So ot side of the loop use open browser and keep for each in side open browser
lets take open browser as www.google.com
when its open u see a type section right so use type activity inside the for each simple then you code will simple and effective and you will not get the error

If you need the same procedure what you mentation in the screenshot use this

CurrentRow.item("LINK").tostring or Currentrow(0).tostring (hear 0 is the index of your excel and you have to write you index example purpose i use this)

If get the solution Mark it as solution and close the thread

Regards
Chethan P

Your for each activity has CurrentRow not Row

Change to CurrentRow

image

Hello, Iput the sequence in attached.
I am getting to to open the Browser (www.google.com) and type the link of the Excel File but the sequence is doing only the first line of the Excel file.
I don´t know the the correct option (sequence or variable) for clean and carries the second line.
The second doubt is regarding the sequence “Get Text”, The tools will to understand the same “print” for the second line? Because are different information in the txt file.
first line - https://www.receitaws.com.br/v1/cnpj/00000000000191
second file - same line and at the end /49090120000153

You have the ForEach set to use CurrentRow as the identifier so you should be using CurrentRow(“Link”).ToString

However, your process is inefficient, opening the browser each time. What you should do is open the browser once before the For Each, and store the Browser Object in a variable. Then use an Attach Browser with a Navigate To within it, inside your For Each.

Thanks, you cold give one example using "For Each, and store the Browser Object in a variable and use an Attach Browser with a Navigate ?
Check if I am correct and if is the option (open browser putting login/password ONCE.
1- Read Range (Excel file) - variable - print1)
2-Open Browser - (variable print2)
3-Click “LOGIN”
3-Type Into “E-mail”
4- Type Into ““Password”
5- Click “Sintegra option”
6- Type Into " Code”
7- For each row in Data Table (currentrow in print1)
8- Type Into (here I have the different information from Excel line - variable print1)
9- CLICK (Go).
10-Get Data (variable print3).
11- Write Text File (variable print3)
Check please if the my project is correct and the variables please.

5- Click “OK”
6-

The last and important doubt is step 7, the variable print1 needs be the same in Type Into (step 8)?

In the Open Browser activity, put your cursor in the UiBrowser output property. Press CTRL+K and type a name for your variable. Then use this same variable as the Browser input property of your Attach Browser activity. This way you can just do the Open Browser once before your loop, then in your loop simply use Attach Browser with Navigate To. This way the browser doesn’t have to open every time through the loop, you’re just reusing the same browser window that’s already open.