This is a migrated thread and some comments may be shown as answers.

Passing Html Instance Variable to Cross Tests

1 Answer 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Saravanan
Top achievements
Rank 1
Saravanan asked on 28 Sep 2015, 06:09 AM

 Hi,

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

Example:    WebTest1
                   HtmlInputText txtleavename = Manager.ActiveBrowser.Find.ById<HtmlInputText>("txtLeaveName");
                   WebTest2
                   txtleavename.Focus();
                   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.

 

Thanks

Saravanan

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 28 Sep 2015, 09:15 PM
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


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Saravanan
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or