Data Scraping with Click activity

Hi Everyone,

I am creating a workflow to scrape information from stock quotes on centralcharts.com.

Below is my scenario:

  1. Open website
  2. Scrape the stock quotes table
  3. Loop through the database and click each company link (it redirects to another page)
  4. Get the additional info for each company

However, it won’t click a company link on step 3 above.

Can anyone please check this workflow and help me out?

Thanks :slight_smile:

centralcharts.xaml (23.6 KB)

If you do your Table Extraction correctly, with the “extract URL” setting, then you’ll have the URL in the datatable, so instead of having to click anything you can just use Use Application/Browser to open that URL and get the additional data.

Hi @anna100 ,
You can use extract data table, in option choose extract url

regards

Hi @anna100

If you are using the modern design activities.
=> Use the Extract datatable activity to scrap the data in the webpage which are in the datatable format. Output of Extract datatable activity is in Datatable variable type, Let’s call it as dtExtract.
=> Use for each row in datatable activity to iterate the rows in the datatable. Output → Currentrow.
=> For dtExtract the column name for company name is Financial instrument. Store the each row value of financial statement column value in a variable with assign activity. Insert this assign activity inside the for each row in datatable activity.

- Assign -> CompanyName = Currentrow("Financial Insteument").toString

=> After assign activity take the click activity and indicate the first company element. When indicating the element in the webpage, make sure to check the strict selector and uncheck the fuzzy and image.
=> Open the target selectors of click activity and select the attribute aaname or innertext which contains the company name in it. Replace the text of attribute with the CompanyName variable which stored the row value, and validate the selector.
=> After this activity use another use application\browser activity to indicate the redirected page to scrap the company details and all.

Hope it helps!!
=>

@anna100

hi
1.create a variable and assign the value to it as shown below
2.pass the variable in the selector of click activity so that it will click on each and every company

3.after the click place what ever activitiess you want like Get Text to get the data from the website
4.at last use Go back activity

hope this helps,if any issue let me know

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.