android - Click element next to some element in java using appium -


off button

refer above image, want click on off/on button shown under map legend. in page, there 3 off/on buttons present here. confusing me how click on particular.

i using uiautomator inspecting android app. using it, don't see xpath avail here.

if provide solution or xpath it. helpful proceed

details:-

  1. java
  2. appium
  3. uiautomator android in linux

you can finding index. use this:

public void tap(int index){ list<webelement> li = driver.findelementbyid("put id"); li.get(index).click(); } 

i guess index 1. way can tap on off button per requirement.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -