0

Can we do IOS webview automation by using resource-id attribute value??

And why can't we run the android,ios,browser using one unique resource-id locator in appium?

Please suggest.

Durga Prasad
  • 301
  • 1
  • 2
  • 8
  • 1
    It looks like you have same question twice: http://stackoverflow.com/questions/33032167/unable-to-perform-actions-in-ios-webview-app-using-id-and-resource-id-attribute ?? – Mahsum Akbas Oct 09 '15 at 09:08
  • Almost same question, need a solution so i posted it.sorry for inconvience. – Durga Prasad Oct 09 '15 at 10:39

1 Answers1

1

Try to add Accessibility labels in the code and then find them by:

findElementByAccessibilityId 
Slavo
  • 494
  • 4
  • 15
  • Thank for your reply, what exactly the difference b/w accessibilityid and normal id. How to add accessibilityid, ios developers needs to add accessibilityid in html pagesource?? I tried driver.findElementByAccessibilityId("id attribute value"); but showing no such element found exception. – Durga Prasad Oct 09 '15 at 11:30
  • There was a similar topic: http://stackoverflow.com/questions/7220739/how-do-i-set-the-accessibility-label-for-a-view-in-xcode4s-interface-builder – Slavo Oct 09 '15 at 12:05
  • Thanks Slavo, I will ask dev team to add accessibility id for one attribute. Have you tried this for your app Slavo. – Durga Prasad Oct 09 '15 at 12:09
  • Another Question, After adding accessibility id in code appium inspector name attribute value will be mapped to assceessbilityid value??? – Durga Prasad Oct 09 '15 at 12:28
  • Try this one: http://stackoverflow.com/questions/30760384/appium-ios-automation-using-java-get-element-using-accessibility-id – Slavo Oct 09 '15 at 13:03
  • Hi Slavo, I observed that accessibilityid can be add to native ios apps, but my app is webview which takes html attributes, could u please suggest how to add accessibility identifer for html elements?? – Durga Prasad Oct 12 '15 at 09:29