SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    varClass assigning value from HTMLObject property

    Hope I can get a little help as I have no programming experience and am teaching myself how to use testpartner.

    Basically I have two testscripts that I want to run together in one testscript. Each testscript can be run independently so I don't want to use modules.

    Script 1 runs through a website and during playback there is HTMLSpan(ID=OrderNumber") The innertext of this span is a order number that is unique with every run. Script 2 is also a web app that accesses our database. There is a HTMLEdit box that accepts order numbers. I would like to pass the order number (from the HTMLSpans innertext) as a variable from test 1 to test 2 so I can automate creating a order than checking our database that the order was placed, inventory adjusted etc.

    To do this I created a varClass (found it on sqaforums ^^)that allows me to pass a variable from one test to another. I got it working as intended by the author of the code, but the problem is that the class only allows me to set the variable as a string I set. example: varCalss = "1234" What I want to do is give varClass the value of the HTMLSpan InnerText value. example: varClass = HTMLSpan("ID='blah") I tried doing this with no luck.

    From all the trial and error from learning TP, I think it's either because I don't have the correct properties and/or methods for my varClass, or I need to somehow reference the HTMLSpan object within my Class module? Any help is much appreciated!

    Here is a snippet from the class module Im using.



    Private iOrderNumber As String

    Public Property Get OrderNumber() As String
    OrderNumber = iOrderNumber
    End Property
    Public Property Let OrderNumber(iStr As String)
    iOrderNumber = iStr
    End Property

  2. #2
    Junior Member
    Join Date
    May 2009
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: varClass assigning value from HTMLObject property

    Got it working. It was a property issue as I thought.

 

 

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 12.00%
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 01:35 AM.

Copyright BetaSoft Inc.