Suppose I have different type of users in excel such as
Type Login Password
admin *** ***
Employee *** **
Now, for type-admin in excel I should be able to enter login and username of admin in a web app
For that I first used open browser to open web app then a read range activity to read excel
-My question here is how to put conditions that “if it is admin then pick from excel login and password and enter it in app”
So you have to process for each user type?
If that is the case you can go for a forEach Datarow after your read range.
Inside this you can have a if condition that if row(“Type”).ToString = “admin” then you can you can have the app login sequence and there in the typeinto you can take row(“Login”).ToString and row(“Password”).ToString
You can do it by using a Read Range activity first to capture the data of the excel into a datatable.
if you are only using the admin type, you can filter that datatable using datatable functions in an assign activity
dt_exceldata.select(“Type = ‘Admin’”)
This will get inserted to a datarow type variable. Then you can loop through it to easily get the username and password.
Or else
If you are going to use different stuff for each user type, you can use the datatable you used in your read range, and create a for each loop
Within that, you may be able to use the Switch activity to execute different tasks based on a specific condition…