I am trying to login to an application. sometime the login section keeps open as shown
so, i have used element exist to get the value into a variable and used if condition to log out and log in. it works fine but, in the element, does not exist the process stop and throw an error.
so how to use element exist and make the bot continue to work even if the element does not exist
In element exist
Give logOut=True
If that element exists perform action
Or
else
If the above one not works
Use check app state activity instead of element exists
ok, but is there a way to fix this
In if give logOut=True
Delete the Element exist activity, drag and drop the same activity and indicate again.
Do it same for Click activity which is inside Then block in If condition.
When you are indicating the element maximize the application window then indicate on it.
Hope it helps!!
It is loooong past time you should be working in modern, and therefore using Check App State.
if i used check app statues will it be the best practice for such cases
Yes it is a best approach,Check app state is a modern activity
but i have noticed that it takes time if the element does not exist. is there a way to make it faster if the element does not exist
Please Mention the time in that.It will wait upto that time if the element appear then it will do action,if not then it won’t do
Thanks for your support i am really appreciate it.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.