This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
6 / 6
Jul 2015

Hi

I am trying to attach an attachment in whatsaap chat. But for that I need to tap on the attach icon.
But I am not able to find any resource-id or text for the same using which I can use the icon.

See the screenshot attached.

Please let me know if there is any other way to use that particular element. Using Java Selenium for scripting.

This is the icon

This is the Node details i got using UIAutomator. Using Appium inspector also I found the same. Using Appium on windows 7

Regards,
Jayabrata

  • created

    Jul '15
  • last reply

    Jul '15
  • 5

    replies

  • 2.0k

    views

  • 4

    users

  • 3

    likes

You should be able to locate it using the content-desc. Thats the best choice.

If not you can go though the class (android.widget.TextView) or even XPath

Telmo is right.

You can refer to Content Desc as below -

driver.findElement(MobileBy.AccessibilityId("Attach"))

using class it is tapping on some other UI as same class has been used in two UI in the screen.

using AccessibilityId it worked...

Thanks

You can use content-desc as follows

Webelement attach = driver.findElementByAccessibilityId("Attach")
attach.click();