Forum Discussion

fasty23's avatar
fasty23
Visitor
7 years ago

Selected attribute

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.

5 Replies

  • "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's avatar
    renojim
    Community Streaming Expert
    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
  • "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's avatar
    renojim
    Community Streaming Expert
    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