plone / plone.app.robotframework

Provides Robot Framework compatible resources and tools for writing functional Selenium tests (including acceptance tests) for Plone CMS and its add-ons.
https://docs.plone.org/external/plone.app.robotframework/docs/source/index.html
11 stars 17 forks source link

Debug keyword fails: 'PASS' is not defined #114

Closed cillianderoiste closed 4 years ago

cillianderoiste commented 4 years ago

With a Plone 5.2 build, when I insert the Debug keyword I get the following error:

Evaluating expression 'PASS == 'PASS'' failed: NameError: name 'PASS' is not defined

If I change the following line: https://github.com/plone/plone.app.robotframework/blob/021cd5e7c785845c17afccadccbe018c0b5cc388/src/plone/app/robotframework/keywords.robot#L35 to Run keyword if '${debug}[0]' == 'PASS' then the Debug keyword works correctly.

I noticed that in http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Evaluating%20expressions it says "Most importantly, strings must always be quoted" and gives the example: '${status}' == 'PASS', so perhaps this is a valid fix. However, if I evaluate the expression, it looks like it already returns 'PASS':

> Run keyword and ignore error  Import library  DebugLibrary  WITH NAME  DebugLibrary
< ('PASS', None)

Versions: plone.app.robotframework-1.5.2 robotframework_debuglibrary-1.1.4 robotsuite-2.0.0 robotframework-3.1.2

datakurre commented 4 years ago

I believe that you are correct and Run keyword if '${debug}[0]' == 'PASS' would be the correct fix.

Possibly the current version has worked on some older robotframework version.