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
Public Property Let OrderNumber(iStr As String)
iOrderNumber = iStr
Re: varClass assigning value from HTMLObject property
Got it working. It was a property issue as I thought.