SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anything Wrong with This Code Example

    I have a code example to try to workaround the Silk not recognizing my combo box. Is there anything wrong with this code?

    window DialogBox Regress
    {
    CSPGComboBox Combo1
    {
    msg tag "$1001"
    }
    }

    winclass CSPGComboBox : AnyWin
    {
    void SetText (sText)
    {
    TypeKeys (sText);
    }
    }

    Regress.Combo1.SetText ("Hello World");

    I get an error message in TypeKeys stating that it doesn't recognize my control. Any ideas why?

    ------------------

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    Your tag for the combobox has a msg gui specifier. What is that?

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    Sorry about that. Typo. It should be msw

    ------------------

  4. #4
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    I copied your code and executed it against a combobox in the Open windows common control and it worked fine. Must have something to do with the combobox itself. What does SilkTest see it as?

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  5. #5
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    The application under test was developed using C# and .NET. Silk sees the combo box as a custom control. I tried to map the control to a combo box, but Silk still has problems trying to recognize the control. So what I have tried to do is to create a ComboBox class derived from AnyWin and tried to manipulate it using TypeKeys command. In the TypeKeys command, I get an error from Silk stating that the combo box doesn't exist.

    ------------------

  6. #6
    Senior Member
    Join Date
    May 2002
    Posts
    448
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    Have you tried Combo1.SetActive () and Combo1.SetFocus () before the SetText () ?

    ------------------
    never say die
    Life, that dares send, A challenge to his end,
    And when it comes say, Welcome friend.

  7. #7
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    SetActive() and SetFocus() won't work since CSPGComboBox is derived from AnyWin. I used Click() and Silk still reports it can't find the control.

    ------------------

  8. #8
    Senior Member
    Join Date
    Sep 2002
    Location
    ONDlodnol
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    Have you tried re-recording a window declartion in your inc file for the combobox?

    ------------------
    Goodness is a part of life just like the Devil

  9. #9
    Member
    Join Date
    Oct 2001
    Location
    Cupertino, CA, USA
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    Yes, I have. I didn't even modify the declaration for the combo box. I just left it as a CustomWin. And just for fun, I called Click() on the combobox. Silk still reports that it can't find the control.

    ------------------

  10. #10
    Senior Member
    Join Date
    Jun 2000
    Location
    Hartford, CT, USA
    Posts
    163
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything Wrong with This Code Example

    Two possibilities:
    1. Focus goes elsewhere at the instance the combo-box is being requested by the script
    2. The recorded frame and actual differ.

    For the second case, try recording just the Object's identity.


    ------------------
    Jaimini Bhatt
    jaiminita@hotmail.com
    jaiminita@yahoo.com
    Jaimini Bhatt

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:54 PM.

Copyright BetaSoft Inc.