Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Fetching text from TVML template
Started by vegard.nyeng Aug 25 2016 02:21 AM

1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

vegard.nyeng

[GLOBAL: userInfoPane.html]
vegard.nyeng
  • Observer

  • 1 posts
  • Corona SDK

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

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,042 posts
  • Enterprise

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




[topic_controls]
[/topic_controls]