Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In Espresso we create the test scripts for a particular scenario like “login to checkout” in which user will log in then the user will place order with his product.
But if the user already logged in, then our script will throw error at the beginning of the script.
So I have the solution for this, in which it will check whether the user already logged in or not , then it will perform action on the basis of logged in state and not logged in state.
We will check that the user logged in or not on the basis of following :-
Now we will apply the condition of “if ” and “else” on the basis of that code:-
In the following code, we are checking that whether user logged in or not .
If the user is already logged in then “if” condition will be executed otherwise “else” condition will be executed by performing the action after logging in.
Hope this blog will help you.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.