Question

How to automate Weblinks click one by one

  • 7 October 2022
  • 9 replies
  • 163 views

Hi All,

 

I have a scenario, I have open one by one link from one site and get the tables items to excel. After 1st click, its not going to the next link.

 

Can someone suggest what is the solution for this:

 

imageBelow loop is not working as shown below:image


9 replies

Badge +4

Hi @Ranjit Nayak​ 

 

I would use destination url to directly navigate to each currency based on a list of the currency code.

 

Example

https://www.x-rates.com/table/?from=b>ARS

https://www.x-rates.com/table/?from=b>BRL

... etc

 

Userlevel 2
Badge +7

It's not clear how you are doing the first part.

 

Assuming you're getting a count of items in the UL and then looping x times with a dynamic xpath?

 

Something like:

//*[@id="content"]/div[3]/div/div/div/ul/li[$Counter$]/a[1]

 

Is it getting back to the home screen after clicking the initial link? If there is an issue using the back function, I noticed there is a 'home' link on the clicked page, which will navigate you back

Yes Thanks, I did the same approach, It did work. I also used navigate back option which clicks the next link after some activity. All fine now.

 

One more challenge in this: After each link click, there are multiple tables for each page in the link, need to extract to a excel and there is no get items options to count. Any approach, how to get to table data inside loop and store in excel?

 

Thanks!

Userlevel 2
Badge +7

@Ranjit Nayak​ The tables appear within the same root element it seems e.g.

 

//*[@id="content"]/div[1]/div/div[1]/div[1]/table[1]

//*[@id="content"]/div[1]/div/div[1]/div[1]/table[2]

 

If the number of tables is not static, you could use an additional loop to loop over the tables, and check the element exists before extracting the table data

 

Can you please help me which is wrong in this looping. Its only taking 2nd table from datatable. Its not taking 1st datatable data.

 

Thanks!

image

Userlevel 2
Badge +7

You appear to be creating your counter after fetching the table details, if you modify the path of the table you'll need the counter to make it dynamic

Hi Paul,

 

Just a question on this assignment i have. I have static table of 2 on each page load, How do i merge both table data into one. what steps need to take to get both the table data?

Userlevel 2
Badge +7

@Ranjit Nayak​ If they are already stored in separate data tables, you can use the Merge action on the data table package

 

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-data-table-command.html

 

If its saved elsewhere like Excel, you can use the database package to query the sheets and use a SQL UNION query to combine them

The usecase is, i need to navigate each link on a page, each link has 2 tables, need to extract values and store in one excel separate sheets for each link.

Reply