Results 1 to 2 of 2

Thread: selecteditem

  1. #1


    Hello all

    I am working with Squish 3.4.5

    I try to get the text from a JComboBox.
    If i use
    <font class="small">Code:</font><hr /><pre> myobj = findObject("{occurrence='3' type='myapp.gui_core.choice.CodeChoice' visible='true' window=':*_myapp.app.BaseFrame'}");
    </pre><hr />

    I get a new Object.
    In the IDE i can type
    myobj.selecteditem OR
    and i get the Text, witch is displayed in the GUI.

    How can i do something like

    <font class="small">Code:</font><hr /><pre>
    if (myobj.selecteditem == "diplayed text")
    Do somethin
    </pre><hr />

    thanks for Help

    Regards Roger

  2. #2

    Re: selecteditem

    I found the answer


    <font class="small">Code:</font><hr /><pre>
    var str1 = new java_lang_String(findObject(strSearch).getSelected Item());
    </pre><hr />

    i get a string with i can check with

    <font class="small">Code:</font><hr /><pre>
    if( str1 == "something")
    </pre><hr />

    Regards Roger



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:57 PM.

Copyright BetaSoft Inc.