How to convert get attribute variable as a global variable

i have created a test case that has get attribute command in it this will store a text value in a variable called C_Main_ref this variable is not a global variable so i can only call this variable from within the same test case, but i want to call the variable in a different test case hence i want the variable to be global so it can be used across all the test cases when it been called. can you show me how this can be done

i have created a test case that has get attribute command in it this will store a text value in a variable called C_Main_ref this variable is not a global variable so i can only call this variable from within the same test case, but i want to call the variable in a different test case hence i want the variable to be global so it can be used across all the test cases when it been called. can you show me how this can be done

Hi there,

Please define a global variables : https://docs.katalon.com/display/KD/Variable+Types#VariableTypes-Globalvariables. After your global variables is created, you can call it anywhere across test cases, e.g:
GlobalVariable.Gl_attribute = WebUI.getAtribute(findTestObject(‘your/object’) , ‘class’))

There is a sample project called Sample Web Project which is built in Katalon Studio project and using this kind of variable. Please refer to it as well by any chance

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO