I have an Excel File with 2 columns: Promotion Number & Percentage Discount
I want to read each line and populate promotion number in a field on the first page and discount in a field on a second page fields on a website.
Example of Data:
PROMOTION | WREWARDS PERCENTAGE
687005 | 20
687006 | 10
687007 | 20
I’ve created the following workflow:
Start
Open Webpage & Log in
DESKTOP
2.1. Read Excel Data
2.1.1.Excel Application Scope: Open FIle
2.1.1.1. DO:
Read Range “Sheet1” “” - Output DataTable: WRewards_Promo
For Each Row in WRewards_Promo
Body:
Get Row Item: row - ColumnName: “PROMOTION” - Output Value: Prom_number
Get Row Item: row - ColumnName: “WREWARDS” - Output Value: WRewards_Percentage
2.2. Attach Browder (that is now open)
2.2.1.DO
Type in Promotion Number: (variable used Prom_Number)
Click Search
Select promotion
Click Update Discount
Select (from drop down) Percentage off
Type in WRewards Percentage (for this specific promotion): (variable used WRewards_Percentage)
Select tickbox “remove diff rewards”
Select Update
Then I want to start with the following row.
I’m having no validation errors when I click “Validate”.
When excecuting I get error:
Source: Select Promotion
Message: Cannot Find the UI Element corresponding to this selector:
RemoteException wrapping UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: —> RemoteException wrapping System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector:
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector, IVariableResolver resolver)
I am able to red my Excel data BUT:
When completing the fields on the webpage, it only reads the last line of my Excel data.
I need to read all data on the spreadsheet by entering the promotion number and then the % discount for that promotion number.
If you want to use the each and every value seperately.
reading the datatable>> use for each row to iterate through each row>>retrieve the values required>>then create the workflow to open the browser then webpage workflow within the foreach actvity after the values retrieval>>close the browser.
To retrieve the values
For each row
row in DataTable
can use command in assign::(Use the in the
promoVal = row.Item(“PROMOTION”).ToString
rewPercentage = row.Item(“WREWARDS PERCENTAGE”).ToString
thank you so much. I’m very new to this so I am still learning!
I read my Excel data into DataTable WRewards_Promo - working as I checked with message box
I log in to my webpage
Now I want to enter each promo and associated % here:
I have set the following:
For Each Row in WRewards_Promo
Body:
Enter Promo Details
Attach webpage
Type in Promo Number
It still only takes the last value in the datatable.