Retrieving and storing data from the webpage[into variables] and writing those into .xls file (spreadsheets)?

uiautomation
studio

#1

Hello,
I am having some doubts regarding the use of workbook and scraping data from the web page.
I was assigned certain task which requires the following process to be followed.

  1. Open the browser(chrome)

  2. Enter the website url (www.carwale.com)

  3. Enter the details of the car in the search bar of this web page.

  4. Retrieve the name of the car and price of that car. by following process.
    a). Enter the name of car in search bar
    b). press “enter” and get text from the web page
    c). after storing the name and cost in the variables, I need to display them in the (.xls file)

  5. open the .xls file (spreedsheet) and store the name and cost of the cars.

  6. I need to make use of (A)th and (B)th column for name and cost respectively.

  7. I need to do this for 10 items (cars).

I can manage to do most of the basic operations upto retriving variables into the single variable.
But I dont know how For loop works [if it is required in this case]. Also I have no clue how to write the data which is stored in the variables into the .xls file.

I know how to read from cell. But i dont really know how writing in the cells work.

Please enlighten me.
NOTE:- I DONT HAVE MICROSOFT OFFICE INSTALLED IN MY SYSTEM. SO I USE WORKBOOK TO RUN THE .xls file IN KINGSOFT OFFICE.

Thanks and Regards,
Error.


#2

Have you been through the Academy 1.0 and 2.0 online (all free) ?

This should take you through many similar examples amongst other things.

RD


#3

Usecase.zip (2.9 MB)


#4

Hey Shruti,

Thank You so much for your solution. I understood most of the things. from your example.
Well to be honest I needed to use the external readsheet (dot xls file) for the final storage of the data elements.
Can you please tell how do i do it?
Like overall,want to search set of cars in that site and then display their name and cost in the EXTERNAL .xls extension file.
Please reply with the same as soon as possible.

Thanks in advance.


#5

change the extension from .xlsx to .xls


#6

use in data srapping to do that