Your Digital Media Has Never Looked So Good

 
fasty23
Topic Author
Posts: 3
Joined: Fri Feb 01, 2019 2:26 pm

Selected attribute

Fri Feb 01, 2019 2:35 pm

Hi,
What is the attribute for elements those are selected or not (true/false)? 
For example:
Radio buttons or check boxes. For e.g. AppleTv has "selected' attributes.
Does Roku have something similar?
Thank you.
 
renojim
** Valued Community Member **
Posts: 3441
Joined: Mon Feb 15, 2010 1:35 pm

Re: Selected attribute

Fri Feb 01, 2019 6:23 pm

CheckLists have checkedState:  https://sdkdocs.roku.com/display/sdkdoc/CheckList#CheckList-Fields
RadioButtonLists have checkedItem:  https://sdkdocs.roku.com/display/sdkdoc/RadioButtonList#RadioButtonList-Fields
 
fasty23
Topic Author
Posts: 3
Joined: Fri Feb 01, 2019 2:26 pm

Re: Selected attribute

Mon Feb 04, 2019 10:44 am

renojim wrote:
CheckLists have checkedState:  https://sdkdocs.roku.com/display/sdkdoc/CheckList#CheckList-Fields
RadioButtonLists have checkedItem:  https://sdkdocs.roku.com/display/sdkdoc/RadioButtonList#RadioButtonList-Fields

Thank you renojim,
In "SceneGraphTutorial" source code found:
example = m.top.findNode("exampleCheckList")
example.checkedState = [ true, false, true, false ]
When I do inspect elements by "sgnodes all" with telent I cannot find any value related to checklist items that returns checkedState array (boolean). (any help appreciated) 
In the next step I need to find a link to between element and checkedState that probably ispossible by having index of element in checklist  and compare it with checkedState array.
 
renojim
** Valued Community Member **
Posts: 3441
Joined: Mon Feb 15, 2010 1:35 pm

Re: Selected attribute

Mon Feb 04, 2019 2:53 pm

You're connecting to the wrong port to do serious debugging/inspection.  You want to telnet to port 8085.  Press Ctrl-C or better yet put a stop statement in the code right after the place where the variables you're interested get used or initialized.  Then use:
?example.checkedState


-JT
 
fasty23
Topic Author
Posts: 3
Joined: Fri Feb 01, 2019 2:26 pm

Re: Selected attribute

Thu Feb 07, 2019 10:10 am

renojim wrote:
You're connecting to the wrong port to do serious debugging/inspection.  You want to telnet to port 8085.  Press Ctrl-C or better yet put a stop statement in the code right after the place where the variables you're interested get used or initialized.  Then use:
?example.checkedState


-JT

Thank you renojim,
I used port 8085 based on https://sdkdocs.roku.com/display/sdkdoc/Debugging+Your+Application 
But we are trying to get "page source" dynamically while app is running to modify appium to handle Roku testing, so far we used "sgnodes all"  to get get "native page source" and interpret them and get info but for checkState it seems it's info is not in node and restores somewhere else.
RALE app be able to get checkState array but mechanism for us is unknown.
 
renojim
** Valued Community Member **
Posts: 3441
Joined: Mon Feb 15, 2010 1:35 pm

Re: Selected attribute

Thu Feb 07, 2019 3:40 pm

RALE communicates with the running channel directly using code found in the RALE component.  You could do something similar, but I don't think you'll get what you want using "sgnodes all".

-JT

Who is online

Users browsing this forum: No registered users and 7 guests