How to push a buttom by Resouce-id

Hi all,

I’m a beginner here.

I select the first element of a WebElement using :smile:
WebElement elements=driver.findElementById(“com.myDomain.android.pre:id/declaration”);
elements.click();

I like to select all elements one by one using the WebElement.

Could you help me please?

Thank you very much!

Best regards,

HI all,

I answer my question as i find the response:

List elementAlerte=driver.findElements(By.id(“com.MyDomain.android:id/tile_button_img”));
elementAlerte.get(indexAlerte).click();

I use this in a loop.

Best regards,