Talk:ExecuteSql
From STIQ
I cannot get variable values out...
The following just produces "undefined variable: customerId"
| executeSql | select customer_id from customers where rownum = 1 | |
| storeQueryValue | 0:customer_id | customerId |
| echo | ${customerId} | |
| executeSql | select customer_id from customers where rownum = 1 | Query returned 1 rows. |
| storeQueryValue | 0:customer_id | customerId |
| echo | undefined variable: customerId | undefined variable: customerId |
Just found it.... at .FrameworkTests.NewCommands.SqlCommands.StoreQueryValue
| executeSql | SELECT * FROM test-data ||
| storeQueryValue | 1:Id | oneId |
| verifyEval | javascript{storedVars['oneId']=='B2';} | true |
The above works (around); however, this is a syntax issue related to Using_Variables (you have to "escape" Selenium variables unless using commands that take Selenium variable names as parameters).
You can use the "show" command to 'echo' a Selenium variable value without escaping the reference.
