3 posts, 1 answers
  1. Nigel
    Nigel avatar
    53 posts
    Member since:
    Jan 2012

    Posted 18 Jul 2012 Link to this post

    Hi All,

    I understand how SetExtractedValue and GetExtractedValue work, but I would like to know if it is possible to create a SetExtractedValue in VB Code Behind without first creating a GetExtractedValue in the main script.  For Instance.

    I could create a line in the test script such as this:
       Extract input 'DesignRequiredUKText' value into DataBindVariable $(DayNum).
    In the Code Behind I could then have something like:
       colValue = TryCast(DirectCast(inputSheet.Cells(rowNum, colNum), Microsoft.Office.Interop.Excel.Range).Text, String)
       SetExtractedValue("DayNum", colValue)
    and everything works fine.

    However, could I execute the SetExtractedValue line in the Code Behind window without first having created the DataBindVariable in the test script? And then could I still use the "DayNum" variable later in the test script?  If so, would I still use it via the data driven binding $(DayNum)?

    Hope the question makes sense!

    Nigel Edwards, Transition Computing.

  2. Answer
    Anthony avatar
    19 posts

    Posted 18 Jul 2012 Link to this post

    Hello Nigel,

    Yes, you can create a new extracted value independently and from scratch. It is not dependent on any other extractions or data binding in the test.

    Add a coded step to the beginning of the test that contains:

    SetExtractedValue("var1", "Telerik")

    And data bind that variable to any subsequent input or verification step the normal way:


    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Nigel
    Nigel avatar
    53 posts
    Member since:
    Jan 2012

    Posted 18 Jul 2012 Link to this post

    Many thanks, Anthony.  :)
Back to Top