Passing Html Instance Variable to Cross Tests

2 posts, 0 answers
  1. Saravanan
    Saravanan avatar
    1 posts
    Member since:
    Sep 2015

    Posted 28 Sep 2015 Link to this post


    We want  to use the Current test Html instance variable to another tests.

    Example:    WebTest1
                       HtmlInputText txtleavename = Manager.ActiveBrowser.Find.ById<HtmlInputText>("txtLeaveName");
                       txtleavename .Text="sick Leave";
    So here we want to use the variable "txtleavename" in WebTest1 for multiple times in the WebTest2. How can we refer this variable without initialize again in WebTest2.




  2. Cody
    Cody avatar
    3360 posts

    Posted 28 Sep 2015 Link to this post

    Hello Saravanan,

    You will need to follow these steps:
    1. Create yourself a utility class
    2. Have WebTest1 save the variable in the utility class
    3. Have WebTest2 get the current value of the variable from your utility class

    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top