1

I am using Robot framework in python and I am running below query:

${queryResults1}=  query  select count(*) from table

It gives me below result:

${queryResults2} = [(91,)]

How to convert above result as String?

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
Dilip
  • 55
  • 1
  • 1
  • 8

1 Answers1

2

The response format is a list of tuples - as can also be seen by the sample you've pasted. Thus get the 1st column of the first row (in python/Robot Framework the lists are 0-based), and pass that to Convert To String:

${the value as string}=    Convert To String    ${queryResults1[0][0]}
Todor Minakov
  • 19,097
  • 3
  • 55
  • 60