Passing variable among test in Telerik Test Studio

Locked Passing variable among test in Telerik Test Studio

  • giovedì 26 luglio 2012 21:01
     
     

    My application is in Silverlight4. I have some controls with text on the screen. I want to parse these contents and get the text of few textblocks. Put these values in an array that is accessible from other tests.
    I tries declaring a public array like :

    public static int[] count;
    but it doesn't work.

    How to define length of array?
    How to access it in any function of any test to modify or put values in the array?
    How to access this array from other applications?
    Can anyone please help me with this problem?

    Thanks

Tutte le risposte

  • lunedì 30 luglio 2012 03:16
    Moderatore
     
     

    Hi RkpSp,

    If you can figure out the length of that array, you can specify the length of that array when you create it. Or you can just define the values of it, count of the values is just the length of the array. For further information about how to create and work with arrays, see: http://msdn.microsoft.com/en-us/library/9b9dty7d.aspx

    And as you marked that array with "static", you can access it in other class with the line:
    Class.count;

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

  • martedì 7 agosto 2012 03:13
    Moderatore
     
     

    Hi RkpSp,

    What about your issue now? Have you resolved it?

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us