Looking for a way to represent module / absolute value in Robot Framework. Is it abs ()? or $ {variable} .abs ()? How can I make my $ {variable} with a negative value of -15 equal to +15
Like this: | -15 | = 15
You need to use the Evaluate keyword to run the abs function on your number:
*** Variables *** ${neg num} -15 *** Test Cases *** Absolute Log ${neg num} ${num}= Evaluate abs(${neg num})
If you need an alternative to Pekka, the best answer is here:
*** Variables *** ${var} -15 *** Test Cases *** Absolute Log ${var} ${abs var}= Set Variable ${var.__abs__()}
Source: https://habr.com/ru/post/1606557/More articles:How to create a structured array from a few simple arrays - pythoncordova-plugin-contacts application crash - androidNumpy: understanding the concept of numpy array for string names - pythonРазбор списка с использованием потоков java - javaDifferent htaccess rewrite rules depending on the $ _GET parameter - url-rewritingHow can I disable all my raw fields in pageload? - jqueryDoes C # have a collection that works like a cache? - c #which Point2D should be used - javaHow to delete a child Realm object? - swiftPlace the registration form to the right of the page - jqueryAll Articles