Fetching text from TVML template

Hi people, I’m trying to figure out how to test a TV OS app. The app is based on both swift code and templates generated by javascript. 

This is the code that generates the text on the view I’m trying to fetch:

 \<text style="tv-text-style: none; color: rgb(0, 185, 242); font-size: 120px; font-weight: bold;"\>\<![CDATA[' + data.code + ']]\>\</text\>\n 

Using Safari’s debug tool options and printing out:print (app.debugDescription), it gives me this;
" Other 0x7fb22ba4b360: traits: 8590000128, {{778.0, 372.0}, {363.0, 144.0}}, label: ‘gpupq’"

The “label: qpupq” is the text I’m trying to fetch, and the label will always be a 5 character string with no numbers, so it will be random. 
 

Is there any way I can fetch that text using UI testing in XCode?

  • Vegard

Hello Vegard. Welcome to the Corona Labs forums. Our forums are for discussing our products: Corona SDK, Corona Enterprise and CoronaCards, which are all frameworks for development that let you build cross-platform apps. In other words, you could, using Corona SDK build an Apple TV app and reuse most all of your code (95%+ in most cases) to build Amazon TV and Android TV apps from a single code base.

While someone in our community might know how to use Swift + JS for Apple TV, this really isn’t the right forum for this discussion. You will be better in the Apple Developer Forums or elsewhere.

I do invite you to go to https://coronalabs.com and download our free developer tools and explore cross platform development, though I’m not sure how beneficial we will be if you’re doing a lot of TVML.

Rob

Hello Vegard. Welcome to the Corona Labs forums. Our forums are for discussing our products: Corona SDK, Corona Enterprise and CoronaCards, which are all frameworks for development that let you build cross-platform apps. In other words, you could, using Corona SDK build an Apple TV app and reuse most all of your code (95%+ in most cases) to build Amazon TV and Android TV apps from a single code base.

While someone in our community might know how to use Swift + JS for Apple TV, this really isn’t the right forum for this discussion. You will be better in the Apple Developer Forums or elsewhere.

I do invite you to go to https://coronalabs.com and download our free developer tools and explore cross platform development, though I’m not sure how beneficial we will be if you’re doing a lot of TVML.

Rob