testing - How to detect change in view in appium(java) :android -


i automating test cases android app using appium (java). stuck on interesting scenario:

my test case change view of products clicking on icon.
that's done.
need verify view has been changed or not, here actual problem comes.
in both cases parent class android.widget.gridview , subclass android.widget.relativelayout
- the way appear on screen changed (first appeared in list type , later in grid type).
i using uiautomator ui elements.
how detect change?
help/ suggestion /work around greatful
update
i attaching screenshots of ui automator.
both views

you know result view going get. verify if element visible or not.

list<webelement> view = driver.findelements(by.classname("android.view.view")); system.out.println(view);  if (view.size() > 0 || view != null) {     viewfound = true; }  

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -