Web table scrapping issue

Workfusion KB example link: https://kb.workfusion.com/display/RPAe/Table+Scraping+Workflow

Open website link: https://kb.workfusion.com/display/RPAe/RPA+Features+Comparison

.${str_table_xpath} = /html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table
1.${str_table_xpath}/thead//th
2.${str_table_xpath}/tbody/tr[${num_count}]//th | ${str_table_xpath}/tbody/tr[${num_count}]//td

How to work on the scrapping example XPaths(1&2) in Workfusion KB?


I am unable to find that, please explain

Hi @Jebaraj You just need to download the example and add tot he Studio. You don’t need to change anything for it to work.
Do you get any error when you run it?

This code works fine but I am unable to find that corresponding XPath1. (/thead//th),2.(${str_table_xpath}/tbody/tr[${num_count}]//th | ${str_table_xpath}/tbody/tr[${num_count}]//td)
this XPath unable to find in inspect element

so please tell how to take this XPaths in another web scrapping

${str_table_xpath} and ${num_count} are recorder variables

image

you should replace them with actual values when looking for the XPath, i.e.

/html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table/tbody/tr[1]//th | /html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table/tbody/tr[1]//td

${str_table_xpath} and ${num_count} are recorder variables

yeah, I know mam these record variables, but I try in inspect elements this(/html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table/tbody/tr[1]//th | /html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table/tbody/tr[1]//td) XPath is not found inspect elements, how to find it?

It might be a Google Dev Tools issue.

The Xpaths above means that the bot will look for all elements with Xpath /html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table/tbody/tr[1]//th or with Xpath /html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table/tbody/tr[1]//td.

There are no elements with the first Xpath, but elements with Xpath /html/body/div[2]/div/div[2]/div[2]/div[3]/div[5]/div/div[1]/div/div/div/table/tbody/tr[1]//td do exist on the page.

ok ,thank you mam

1 Like