Hi, I have an issue with Appium Library Get Text in IOS. This returns the accessibility_id of the element instead of the text of the element.
Code:
${Text} Get Text accessibility_id=order-shaken-win-timer
Log ${Text}
I found that ${Text} returns the accessibility_id, which is order-shaken-win-timer.
I expect that it should return the text of the element, which is free coffee voucher.
Any solution to get the text in IOS using Appium Library in Robot Framework?
Thank you.
Wolfe1
(Brandon Wolfe)
2
Perhaps the text you are looking for is actually being held in a different attribute?
Maybe try Get Element Attribute with value or name?
Otherwise is you show the details panel from the Appium inspector it may give more clues here.
Hi Wolfe1, thank you for your reply.
I have also tried the Get Element Attribute with value and also with name.
Both of them returned the accessibility_id of the element which is “order-shake-and-win-timer”.
I’m attaching the details panel from the Appium inspector here.
Thanks for your help.
Wolfe1
(Brandon Wolfe)
4
Hmmm a few more things you could try:
- Try using ‘Get Element Attribute’ with ‘text’ as the attribute.
- You could try the elements further up the stack to see if they are the real element holding the text
This would of course mean trying all those methods on each of these but that text has to be somewhere!