enter image description here

How to automate WEBVIEW content in Android Automation ?

In above attached Image i want to verify Bold and Underlined content.

Can anyone help me regarding it ?

1 Answer 1


If you are using Appium or Selendroid to automate this WebView, you may simply use the inspector to locate the element/elements used for Bold/underlined text. Once you have located the element, simply use getText method to get the text inside that web element.

  • I use SEETEST automation tool and i am only able to find LINK and HEADING using it.
    – Gaurav
    Oct 23, 2016 at 14:22
  • 1
    Haven't used seetest much... however I think you can select the zone for bold/underlined text and use getText method. Here is a link that may help docs.experitest.com/display/public/SA/GetText Oct 23, 2016 at 14:28
  • Yup its giving Text in String. but i need to verify BOLD etc. content
    – Gaurav
    Oct 23, 2016 at 14:30
  • In that case I would suggest you used xpath to verify if the text is inside the bold tag. use xpath to locate the element and traverse from parent node to child node which has bold tag... for eg, you may write xpath on similar lines, xpath= //div[@id='abc']/b[contains(text(),'automation engineer')] . I am assuming the text is inside a div tag and uses bold option in the example... if it uses strong attribute, you may modify the xpath and write it on the basis on attribute Oct 23, 2016 at 14:39
  • Appreciated answer but its a Android Automation Native Application so no div i found in it and I am only able to find VIEWS
    – Gaurav
    Oct 23, 2016 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.