How to use the same Key Sequence variable in diff recording
Posted: Tue Dec 20, 2011 8:27 pm
Hi,
I have several recordings where I enter the same company name in a text field on different pages of the application. I then converted the company name into a variable for all those recordings. I also have a global parameter "companyName" where the value is "Test Company". I understand that one option is to bind the global paramenter "companyName" to every company name variable in each recording. Another option is to use a code module where I have a line for each recording to set the variables. For ex:
Recording1.Instance.companyName = TestSuite.Current.Parameters["companyName"];
Recording2.Instance.companyName = TestSuite.Current.Parameters["companyName"];
Recording3.Instance.companyName = TestSuite.Current.Parameters["companyName"];
...
Both options seems to be inefficient especially if I have a lot of recordings entering the company name. Is there a better way of doing this? I was hoping that in each recording, I could pick the same companyName variable for each recording.
I have several recordings where I enter the same company name in a text field on different pages of the application. I then converted the company name into a variable for all those recordings. I also have a global parameter "companyName" where the value is "Test Company". I understand that one option is to bind the global paramenter "companyName" to every company name variable in each recording. Another option is to use a code module where I have a line for each recording to set the variables. For ex:
Recording1.Instance.companyName = TestSuite.Current.Parameters["companyName"];
Recording2.Instance.companyName = TestSuite.Current.Parameters["companyName"];
Recording3.Instance.companyName = TestSuite.Current.Parameters["companyName"];
...
Both options seems to be inefficient especially if I have a lot of recordings entering the company name. Is there a better way of doing this? I was hoping that in each recording, I could pick the same companyName variable for each recording.