Comments (4)
Hi,
I think is quite complex since keywords like Run Keyword If*\Set Variables If*
are open gate for syntax like ELSE IF\ELSE
( see: http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Run%20Keyword%20If ). I have been checked it and even RIDE do not support such fully validation. But I think in some point we will need to put some effort to introduce such validation.
Best Regards,
-Adam.
from red.
Copy of some discussion with Michal from ( #224 (comment) ):
However it seem to be quite hard to make it customizable for users because those keywords are basically free to interpret provided arguments and sometimes there may be non trivial logic implemented there.
To be honest I was thinking that you do not need to treat whole line of execution as one. If you will use old technic divide and conquer, you can achieve customise ability. In my opinion if you will just check each keyword separately (nested keyword) is not to hard to achieve possibility to have some kind of the table, which will say that argument on position 2 of keyword X is keyword name and start from the next position (3) could be his arguments.
Anyway I think the most critical for both hardcoded and customizable is to decide if ELSE is part of keyword put as argument or is part of Run Keyword If syntax. This I think require to take a look how Robot Framework is parsing such syntax.
So regarding Run Keyword If
as nested keyword in other Run Keyword If
, some clarification is needed from Robot Framework contributors. I figurated that the syntax is not fully supported, as it could be expected (robotframework/robotframework#2871). Shortly describing the issue, ELSE
from the latest nested Run Keyword If
is used for any Run Keyword If
condition in the path.
Anyway, I reviewed the Robot Framework source code related to handling Run * If
keywords. Base what was written in comment for Run Keyword If
method ( https://github.com/robotframework/robotframework/blob/master/src/robot/libraries/BuiltIn.py#L1680 ) :
Notice that
ELSE
andELSE IF
control words must be used
explicitly and thus cannot come from variables. If you need to use
literalELSE
andELSE IF
strings as arguments, you can escape
them with a backslash like\\ELSE
and\\ELSE IF
.
Base on this I think it shouldn't be hard to introduce support for customizable keyword variants.
I am not aware if logic related to discovery from where keyword comes still stays in plugin, but I think is possible to create filter/wrapper output of https://github.com/nokia/RED/blob/master/src/RobotFrameworkCore/org.robotframework.ide.core-functions/src/main/java/org/rf/ide/core/testdata/model/table/exec/descs/ExecutableRowDescriptorBuilder.java, which will get an information about keywords (basically if keyword with name is variant keyword
) from plugin and will include information about treatment of ELSE
, ELSE IF
, END
, or
, and
(case sensitive) in condition as special words.
It should return splitted variant keywords to execution lines understandable by validation logic. As the advantages of this solution the BuiltIn.Run Keywords
can be handle in such approach as well.
from red.
As per Pekka response (robotframework/robotframework#2871 (comment))
We could easily document that nested used is not supported in
Run Keyword If
documentation.
So such nested ELSE usage should be mark as an error.
from red.
released in 0.8.7
from red.
Related Issues (20)
- eclipse+RED Robot Editor,False positive error HOT 1
- Cannot find RED.exe or any .exe files in RED master. Perhaps I'm the fool but it's really not clear to me how to go about installing RED without an executable file. HOT 1
- any plan to support robot framework 4.0? HOT 2
- Successfully imported python library does not see its keyword in run HOT 1
- Cannot use Undo in Eclipse HOT 4
- Guideline for Developer : How to build and debug Red Plugin source code HOT 2
- An internal error occurred during: "Looking for Python installations". HOT 2
- How to rerunfailedsuites using maven plugin
- With latest version of Robot Framework i am unable to get assistance calls HOT 1
- RED can not support adding library by pyc files
- How can I configure the working directory for a test execution? HOT 4
- 'Building' has encountered a problem. An internal error occurred during. "Building" HOT 5
- Unable to communicate with XML-RPC server HOT 2
- Missing requirement: org.eclipse.equinox.app 1.4.400.v20191212-0743 requires 'osgi.ee; (&(osgi.ee=JavaSE)(version=1.7))' but it could not be found
- does RED editor support Robot framework 5? HOT 2
- Library not being recognized using Red HOT 3
- Error while building new Project
- Unable to open .robot files after RED installation in Eclipse: Unable to initialize Suite editor HOT 3
- Is Eclipse and RED supporting Robotframework 6.0?(Project is not building in Eclipse with RED "https://sourceforge.net/projects/red-robot-editor/files/repository/0.9.1/)
- Library specification generation problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from red.