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 126.96.36.199 release ready!
Espresso is a UI automation tool for Android by Google and it is used for Black box testing.
Now we will see the basic the issues faced in the script of Espresso.
After recording the script in Espresso the issue arise in following manners:–
So we will see these three issues and their solutions.
In the following code “fax” is the id of the field in which we are replacing an text of “7887777” so if the field is not visible during execution of the script then due to “scroll to” it will scroll to the field which is not visible on the screen automatically.
In this condition I had already given a solution in my previous blog which will work in recycler view i,e
Now I had some new technique for this problem you can use this technique also which is called “custom matcher” in this we perform a custom match using the index value in which we define the index value of an object so that it will easily perform an action even with the same ID of multiple object.
Here is the code for that :-
After defining this you can simply define the index value for an object by the following code.
In this we defined the index value “2” in which it will perform an action only on “2nd” index even though multiple object will have the same ID .
For this simply use :-
Using “Thread.sleep” we can halt the screen for a while s that it can easily find out the object on which we are performing some action.
I had uploaded one video in which I had used all the defined approaches for executing the script smoothly.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.