SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    arvada,co,USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading disabled textfields

    Does anyone know how to gettext() on a disabled textfield? getcontents() or anything like that work?

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

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    Hi,

    You probably need to change the Agent options. This can be done in two ways either through Options / Agent / Verification in SilkTest or in your code using,

    Agent.SetOption (OPT_VERIFY_ENABLED, FALSE)
    // ... code here to extract text
    Agent.SetOption (OPT_VERIFY_ENABLED, TRUE)

    I hope that this helps.

    John.

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

    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    NY,NY,USA
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    Try GetProperty(), you can get a list of the properties with GetPropertyList(), the fact that the object in not enabled shouldn't matter

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

  4. #4
    Junior Member
    Join Date
    May 2001
    Location
    arvada,co,USA
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    cool, i'll try that. Thanks!

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

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    You can also use VerifyProperties () which will do a verify against a LIST OF PROPERTIES. If you point the recorder at the object and press <Ctrl>+<Alt> it will bring up a dialog where you can pick the properties you want to check. You can check for two items, 1) Enabled & 2) Text.

    The nice thing about this method is thet you can drop variables into the property list so the expected doesn't need to be hard coded.

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

  6. #6
    Junior Member
    Join Date
    Dec 2003
    Location
    pune
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    Hi woodman,
    May I know what do you exactly mean by "you can drop variables into the property list so the expected doesn't need to be hard coded.
    "
    Please explore more on this it may help me a lot

    Rgds,
    Sandeep K.
    Rgds
    sandeep

  7. #7
    Senior Member
    Join Date
    Aug 2003
    Location
    NY
    Posts
    708
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    Hi Sandeep,

    What he meant was we can use variables with which to verifyproperties against. Supossingly you are verifying the caption, you can use your variable say strCaption in the VerifyProperties method call and you need not directly hard-code the caption.

    Please let me know if you need the code for that.

    Thanks and Regards,
    Harshil

  8. #8
    Junior Member
    Join Date
    Dec 2003
    Location
    pune
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    Hi Harshil,
    Thanks a lot for explanation.
    Rgds
    sandeep

  9. #9
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    Back to Astro's original question regarding getting text from a disabled textfield, did you get this working??

    I've fought this battle before more than once and never won it, so hopefully, your situation turned out better than mine.

  10. #10
    Junior Member
    Join Date
    Dec 2003
    Location
    pune
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Reading disabled textfields

    Hi DJGray,
    I did used
    Agent.SetOption (OPT_VERIFY_ENABLED, FALSE)
    // ... code here to extract text
    Agent.SetOption (OPT_VERIFY_ENABLED, TRUE)

    And this is working fine.

    Thanks Harshil
    Rgds
    sandeep

 

 

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 05:41 AM.

Copyright BetaSoft Inc.