Forum Discussion
Say your TestDriver() method is in Unit1.
First make this method to return required data.
Then if you want to call it from another module:
from Unit1 import TestDriver currentTestCaseData = TestDriver()
baxatob thanks for the info ,but am able retive the complete data but i need a particular data suppose
Now i need only Testcase 4 row data only ,so cant split the data while processing it or else cant we store it in some particular project variables base on the row wise and read that particular row values.
- baxatob8 years agoCommunity Hero
I prefer to use DB Table variables based on Excel worksheet.
First you need to create such kind of ProjectSuite / Project / KeywordTest variable, e.g my_testcases variable.
After you have assigned your excel worksheet to this variable you can manipulate it:
def get_test_case_data(test_case): source = Project.Variables.my_testcases source.Reset() while not source.Value['TestCase'] == test_case: source.Next() execution = source.Value['Execution'] param1 = source.Value['Param1'] param2 = source.Value['Param2'] module1 = source.Value['Module1'] module2 = source.Value['Module2'] return execution, param1, param2, module1, module2
- JackSparrow8 years agoFrequent Contributor
baxatob thanks for the article but where exactly in need to click to get the DBTable since when i tried to RClick and see there is no variable Page.
- baxatob8 years agoCommunity Hero
1. Create new variable
2. Under column Type select DB Table
3. Under the column Default Value click [...] button, it will open the wizard.
4. Select Excel worksheet and click Next >
5. Click [...] button and select your excel file. Click Next >
6. Select required worksheet and click Finish
Related Content
- 2 months agoNicolaFilosa_SE
Recent Discussions
- 8 hours agoSvetaG