SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Sep 2007
    Posts
    59
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Capturing Text and Placing it into a Variable

    Please excuse me on this, I'm transitioning from TestPartner to SilkTest.

    Using SilkTest I identified an object and it returned this line of code:

    <font class="small">Code:</font><hr /><pre>
    WebBrowser2.BrowserWindow.//SPAN[@textContents='1,745']
    </pre><hr />

    I'm trying to do what I would think to be simple, but it's not working, I'm trying to put the value 1,745 into a variable to be used later. Most likely it's my lack of .Net skills. Can someone point me to some documentation on what scripting skills I need to do this "simple" task.

    Thanks,
    Scott

  2. #2
    Member
    Join Date
    Sep 2007
    Posts
    59
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing Text and Placing it into a Variable

    I forgot to add that I'm trying to test a website using IE8. The object, from the user perspective is just a bit of text on the side of the screen. I really can't tell you how it was developed though.

  3. #3
    Senior Member
    Join Date
    Jan 2005
    Location
    UK
    Posts
    334
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing Text and Placing it into a Variable

    Here's an example, which captures the email field of Insurance Demo and displays the result.

    <font class="small">Code:</font><hr /><pre>
    [ ] STRING val = Desktop.Find("/BrowserApplication//BrowserWindow//INPUT[@id='login-form:email']").GetText()
    [ ] Print(val)
    </pre><hr />

  4. #4
    Member
    Join Date
    Sep 2007
    Posts
    59
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing Text and Placing it into a Variable

    Thanks for the information. I'll give it a try.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 02:14 PM.

Copyright BetaSoft Inc.