Dhivya Prabha
Dhivya Prabha

Reputation: 77

Remove " " from String in robotframework

My code is,

*** Variables ***

    ${sample}       2000, 2002, 2050, 2010-2020

*** Test Cases ***

MyFirstTest 

    ${num}=         evaluate       '${result}'.replace('"','')
    [Setup]  Create Service   Test  ${sample}  ${pub_mail}

enter image description here

This is the actual result. I'm tryin to pass more than one numbers instead of one single number. But I'm getting " " in my result. How to resolve it?

enter image description here

Upvotes: 0

Views: 731

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 386342

The reason you can't remove the quotes is that the data doesn't contain any quotes. When you see quotes, this is just how python displays lists, tuples, and dicts when printed out. In the actual data there are no quotes.

Upvotes: 2

Related Questions