Hey Folks,
I want to read the data from the excel sheet and match it with the web page.
if data is matched then it clicks approve else reject it.
so can you please help me to do this.
Hey Folks,
I want to read the data from the excel sheet and match it with the web page.
if data is matched then it clicks approve else reject it.
so can you please help me to do this.
1. - Read Range (store data in a DataTable variable)
2. Open Browser (navigate to the web page)
3. For Each Row (iterate through DataTable)
- Assign row data to variables
4. Web Automation (match data on web page)
- Use activities like "Get Text" or "Table extraction" to extract data from the web page
- Store the web page data in variables
5. If activity (compare data)
- Use conditions to compare data from Excel and the web page
- If data matches, click "Approve"; otherwise, click "Reject"
- Use Click activity to interact with the appropriate buttons on the web page
Hope it helps!!
=> Use read range workbook activity to read the excel and store in a datatable.
=> Use for each row in datatable activity to iterate the rows in the datatable. Output - CurrentRow
=> Inside for each Insert the If condition and check the condition
=> If condition is satisfied in then block give the click activity.
Hope it helps!!
You can change the aaname or innertext in the selector as a variable that matches a particular row value in the excel datatable
E.g:-
<webctrl tag='TABLE' /> <webctrl isleaf='1' tableCol='4' tag='TD' aaname='{{mobileNo}}' innertext='{{mobileNo}}' />
Excel Application Scope (workbookPath)
Read Range (output: dataTable, sheetName)
Open Browser (url)
For Each row In dataTable.Rows
dataToMatch = row(“Column Name”).ToString() // Replace with your column name
// Navigate to the web page
// Use "Find Element" activity or other methods to identify elements on the web page
If ElementExists("Approve Button Selector")
Click Element ("Approve Button Selector")
ElseIf ElementExists("Reject Button Selector")
Click Element ("Reject Button Selector")
Else
Log Message ("No matching action found for " + dataToMatch)
End If
End For
Read Range Workbook:
Read Range (Sheet1) → DataTable1
Open Browser:
Navigate to your web page
For Each Row (row in DataTable1):
Read data from DataTable1 (e.g., itemToMatch)
If Data Matches on Web Page:
Click “Approve” button
Else:
Click “Reject” button
What exactly i can write in IF Condition, please explain.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.