I have a list with data as float or number and I need to convert it to String for comparison with robotframework with another dataset which is in String only.

I tierd string operations from robotframework but I didn't found anything to convert float to String.

closed as off-topic by Moro, João Farias, c32hedge, Bharat Mane, NarendraC Sep 30 at 9:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development unrelated to testing are off-topic here, but can be asked on Stack Overflow." – Moro, João Farias, Bharat Mane, NarendraC
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Float to String conversion is a question that should be asked on other boards. – Moro Sep 27 at 11:53
  • I disagree with this being off-topic. Robotframework is a keyword driven testing framework. We answer plenty of questions about Selenium here, so I'm not sure why a programming question specific to Robotframework is off-topic. – anonygoose Sep 27 at 12:52
  • Any help would be appreciated regarding question – Prasad_Joshi Sep 27 at 12:58
  • 1
    How are you getting floats? Can you show some code. Robotframework seems to go out of its way to treat most data as a string unless you ask it otherwise. Would you be able to post some very simple Roboframework code that shows the problem you're having? – anonygoose Sep 27 at 13:09
  • 1
    How? Show us some Robot code :) – Niels van Reijmersdal Sep 27 at 13:41

From the documentation I expect any "item" to be able to Convert To String: https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Convert%20To%20String

Maybe you should first Convert To Number, those seem Floats: https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Convert%20To%20Number

  • Yes, after some trial and runs I was able to convert float to String via convert to Number – Prasad_Joshi Sep 28 at 4:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.