This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
4 / 11
May 2018

Hi,

I’m using Appium 1.7.2 and automating a native application which is written in React. Not sure if anybody else is facing this issue but when I’m trying to get a text of an element in ios application, the text value is the same as accessibility label, value, name and not giving me the actual text that is visible on the application.

We are using accessibilityLabel’s to identify elements and we can reach the elements. The problem is last week we suddenly couldn’t get the text of the elements in ios application. On Android same elements can give the correct text but on ios it is as I said.

We’ve already tried the followings;

  • Roll back to previous version of react native
  • Using a testId to accessibilityLabel converter plugin
  • Getting every type of attribute, name, text…

Thanks in advance

  • created

    May '18
  • last reply

    Sep '18
  • 10

    replies

  • 1.7k

    views

  • 4

    users

  • 3

    links

How are you trying to get the text of the element. Please share the code statement

driver.findElementByAccessibilityId(accessibilityId).getText(); / also tried with getAttribute(“value/text/name/accessibilityLabel”)

driver.findElement(By.xpath("//XCUIElementTypeOther[@name="" + elementName + “”]"));

I can find the element but when I’m trying to get the text its the same as the accessibilityId, and in the both appium and xcode inspector it also shows all of the values are the same.

Thanks. Did you try to use the same Appium server version that you have been using before and see if problem persists. or use the latest latest version of Appium server

I’ve tried with the latest Appium version also and it was a failure also.

Try switching to webview and try to fetch the text. It could be react native rendering issue

1 month later
1 month later