Need to open portal and search for employee

I have one scenario where I need to login to portal and sign-in then, i need to search for a list of employees to check they are present or not.
So, i will first get the list of employee emails from excel file and then check whether each and every employee presents in the portal or not.
If I need to search for 500 employees I don’t want to open 500 browser session. I need to open one browser session and check there over and over again.

So how will approach to this scenario.

Any suggestion on this ?

Thanks in advance

Hi @davemitra,

You can use a For each row activity to loop through the employees.

Open the browser before the for each row loop.
In the loop, check if the employee is present and then bring the page back to original state before the next iteration.
Close the browser once the for each row ends.
Hope this helps.

Happy Coding! :slight_smile:

1 Like

Now when i open the portal and search for the employee it usually takes some times to show the result.
I am using currently element exists activity to check whether employee present or not from the result on the portal. So it will iterate through the datatable row and check for every employee email and if not found then it will add email to another datatable.

Now as i mentioned the portal usually takes sometimes to load the result though it is not constant every time. Sometimes it shows the result very fast.
If the activity does not get the result very soon it considers it as not present (though the employee exists) and move on to next iteration.
If i use element exists activity then what property should I put in the activity so it works fine properly.
Or should I go for element appear activity.

Imagine If i need to search for 500 employees then which approach will be more applicable to use.
Any suggestion will be appreciated.

Thanks in advance.

Hi @davemitra,

There is a property called Timeout in the Element exists activity. It is the maximum amount of time to wait for the mentioned element.
By default, it is 30 seconds. You can increase the time in milliseconds to whatever time it takes for the element to load. If the element loads faster, the next activity is proceeded, else bot will wait for the specified amount of time.
Hope this helps.

Happy Coding! :slight_smile:

Yes, i know the timeout property and i didnt put anything in there as it will wait 30 seconds.
So, right now i am doing in this way

  1. type email and enter
  2. use element exits activity and try to find “Title” ui element which will tell that employee presents, if present then go for next iteration otherwise add the absent employee email to other datatable (say DT2) using the element exists output variable which is boolean.

If employee does not present, the element exists activity will try to find or wait for “Title” ui element for 30 seconds (by default). I dont want this as it will increase the execution time.
So, I put 5 seconds but then I am having issue with slow loading time of the portal and it adds the email to the final datatable which is DT2 even though the employee presents.

Let me know any suggestion on this.

I think increasing the Timeout will be the better option as the site is slow in your case.

Optionally you can run the check again for dt2 and removing the entries which are present in the site, but ultimately I would go with increasing timeout.

1 Like