Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert list into string in robot framework

I want to convert given list into [u'', u'src', u'kirti', u'lib', u'auto'] string using robot framework /src/kirti/lib/auto/

like image 910
kirti kumbhar Avatar asked Jun 04 '26 22:06

kirti kumbhar


1 Answers

Assuming that the robot list @{data} contains the information you want to join, you can use evaluate along with robot's special syntax for variables to call the python join method:

*** Test Cases ***
Example
    @{data}=  create list  ${empty}  src  kirti  lib  auto
    ${path}=  Evaluate  "/".join($data)
    should be equal  ${path}  /src/kirti/lib/auto
like image 154
Bryan Oakley Avatar answered Jun 07 '26 23:06

Bryan Oakley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!