Hi community!
I am trying to pass a variable from testcase 1 to testcase 2 using set global variable
but it is not working
this is how I do it
in test case one,I fetch my first variable which is my sales orde id
${orderID} Get Text //div[@name=‘TabHeaderGeneral_SalesTable_SalesId’]
that works fine!
Then I pass this variable to my Global variable using
${Global} Set Global Variable ${orderID}
so I have now created a global variable with the value ${orderID}
in test case 2
I am trying to call ${Global} and it is not working
Input Text (any xapth) ${Global}
error says ${Global} not found
*** Test Cases ***
Test Case 1
Set Global Variable ${ORDER_ID} 123
Test Case 2
Log To Console ${ORDER_ID}
Output:
==============================================================================
Test Case 1 | PASS |
------------------------------------------------------------------------------
Test Case 2 123
Test Case 2 | PASS |
------------------------------------------------------------------------------
DemoGlobals | PASS |
2 tests, 2 passed, 0 failed
==============================================================================