Selecting pop up menu item in Android

Can someone help me with selecting the menu item in android

Please provide the screenshot of what you want to inpsect

I need to select the refresh menu item

Can you able to inspect this menu list using uiautomatorviewer or not. If yes, then please send the inspecting screenshot here

No I am not able to automate it. It used to work with the old version of appium by using by.name property. But in the latest version by.name property is deprecated I am not able to use it

Use it by other locators instead of name , may be it will work

There is a tool called uiautomatorviewer that is part of the android tools you’re likely using. You can use this to grab the screenshot as described by yadsandy. It will also likely reveal the other locators that can be used.

This is system generate pop up , We cant capture it from uiautomator
appMehtods.debug(“x and y cordinates of channael number “+channelNumber+” slot:”+ coordinates.x+" & "+ coordinates.y);
int x=webDriver.findElement(By.id(channelNumber)).getLocation().x;
int y=webDriver.findElement(By.id(channelNumber)).getLocation().y;
webDriver.tap(1, x+181, y+35, (int) 0.5);

  1. First i am taking the coordinate of a button which is visible to uiautomator.’
  2. Then manually i am taking the location of the sysyem generated pop up.

What does channel number stands for?? Is it the menu_item id??

Above one is an example.

In your case you can take the ID of Test and get the location

@Jitu1888, we deal with lots of system generated popups in our project, and I have no problem using uiautomator to access them, or uiautomatorviewer to view them. Can you please verify if you can see it using uiautomatorviewer?