Create an Excel Sheet and save different Data from different cards

Hi! Everyone I am putting different names on “https://rpachallenge.com/movieSearch” and creating excel file of corresponding movie name. Further i am using For Each UiElement to click on different movie names.

Here I am getting names In CurrenElement_Label variable and further i want to paste all these data in excel sheet. for another movie there will a different excel file and all movies

You can try using a Build DataTable activity and pass the item array using Add Data Row activity to the data table inside the loop. Once you’re done with all your iterations, you can write it back to the Excel file.

Hi @Sawaira_Nawaz1 ,

Open Browser: “https://rpachallenge.com/movieSearch 2”

  • Output: browserSession
    |
    Excel Application Scope (Path to your input Excel file)
    |
    |-- Read Range (Output: movieNamesTable)
    |
    For Each Row in movieNamesTable
    |
    |-- Type Into (Input: row(“MovieName”).ToString, Selector: Search field)
    |-- Click (Selector: Search button)
    |-- Delay (Duration: “00:00:03”) 'Wait for results to load
    |-- Find Children (Selector: Movie names in search results, Output: uiElementCollection)
    |
    |-- For Each UiElement in uiElementCollection
    • TypeArgument: UiElement
      |
      |-- Get Attribute (Attribute: “text”, Output: currentMovieName)
      |-- Add Data Row (ArrayRow: {currentMovieName}, DataTable: movieResultsTable)
      |
      Excel Application Scope (Path: Path.Combine(“OutputFolderPath”, row(“MovieName”).ToString & “.xlsx”))
      |
      |-- Write Range (DataTable: movieResultsTable)

Regards
Sandy