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' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -