Forum Discussion

David91's avatar
David91
Frequent Contributor
3 years ago

FindEx cant find object by string with newline and other blank char

Hi,

 

I have a problem with finding an object by string. I have tried all methods (textContent,ContentText, innerText etc.) but without success.

Does anyone know how to search for this string on the screen..? The problem is that the text is indented using \r \n..

 

Object properties

My code

 

function TestTitle(TITLE_2)
{
  var title = Aliases.Device.Process_androidclientDev.Layout_NO_ID.Layout_action_bar_root.Layout_content.WebView_vmc_screen70_text_title.Page("about:blank").Panel("wrap")
  var title_3 = title.contentText

  Log.Message(title_3)
  
  var findText = title.FindEx("textContent", TITLE_2, 2);
  
  Log.Message(findText) // findText is Empty .. object not found
  
 
  
}

 

Thank you for your advice!

 

  • Have you tried putting a wildcard in the front of the string you want?

  • Have you tried putting a wildcard in the front of the string you want?