Guest User

Untitled

a guest
Jul 18th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Connect to Database pymssql DBNAME UNAME PWD PORTNO
  2. ${QueryResult}= Query SelectQuery
  3. Log ${QueryResult[0]}
  4. Inputtext id ${QueryResult[0]}
  5.  
  6. Log ${QueryResult[0]}
  7. # the output is
  8. # (Decimal('2'),)
  9. # e.g. "a single row, that has only one column" - just one tuple member
  10.  
  11. ${value}= Set Variable ${QueryResult[0][0]}
  12. # if you run Log on it, the output most probably looks like this:
  13. # Decimal('2')
  14.  
  15. ${value}= Convert To String ${value} # now it's no longer Decimal, but plain str type
  16. Input Text id ${value}
  17.  
  18. ${result} Query ${query_string}
  19. ${first} Set Variable ${result[0][0]}
Add Comment
Please, Sign In to add comment