Track the login attempts and display the correct combination?

Hello Everyone,

How do I create an user login workflow in a particular website. Steps given below.

  1. drag in the “workbook>read cell” element from the search bar in the activity panel

  2. give in the username and password in the spreedsheet{after creating .xls file} which is created anywhere in the system

  3. give in the path of this spreedsheet in the “>workbook_read cell” along with its location in the sheet1 (for example “A3” or “B2”)

  4. above step ensures that the elements in the given locations are retrieved

  5. open browser

  6. give in user credentials (username and password)

  7. click on login


-I need to make more than one combinations of usernames and passwords in the given sheet1. (such as if A2 is not the correct password check is the next one ie: A3)

  • At the same time, keep track of the number of attempts needed to ensure that the given combination (of username and password is correct and login is done. )

  • Finally after the login attempt is correct display the “message box” saying that which all attepmts were made and which {2nd or 3rd or 1st or …} attempt was correct.

I hope i made my question clear enough. Please make sure you understand my question. If need some clarification, kindly let me know about it.

Thanks and Regards.

Hi Hacky,

Use Read Column activity to read the column from excel which has password combinations.

Loop the output of read column.

Break the for each loop when password combination is successful using Break activity.

Create an integer variable and increment it inside for each to know index of the password.


1 Like

@rahamtullah I agree with the solution.

One more way could be as you have data in the excel sheet probably
username password as column names
and several rows for the correct and incorrect combinations of password and username
quick way could be

  1. read the excel sheet using read range activity store it in a datatable
  2. Add a column “status” in datatable
  3. for each datatable activity will allow to iterate through the datatable
  4. When the login is success add status success or if incorrect credentails log status - failure.
  5. Finally either copy the whole datatable to excel sheet or just read the status column

Condition “isError” need to have “Expression as Object” as Boolean to return. Please let me know, what Expression need to write for browser login success or failure.


Hi @srinivasysr2003,

Bot checks for the element which will be available if the login is successful.
isError is the output of Element exists activity of type Boolean.

If Element Exists returns true then login is successful, else not successful.


Thank you for reply. This “Element exists” activity is always returning true and not able to proceed.

I have tried with “Get Attribute”, “Find Element” & “Get Text”. Only “Get Text” activity worked for me after trimming the get text to compare whether that specific attribute exists in the variable or not.

If condition as “getText.Trim.Equals(“Dashboard”)” to make it work as “Get Text” variable having lot of spaces at the end and line break also.


1 Like

Use excel sheet to write down the elements and compare.