in addition to "Teardown Selenium", I have some tests for which I need
to run at least one additional keyword on test teardown. Is there any
way to use Test Teardown with more than one keyword, or would I have
to wrap the keywords I want to run into one keyword like "Test-XY
Specific Teardown"?
Cheers
Robert
Cem
> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
>
>
Robert
What if there was a keyword that was "Run Keywords", and it takes a
variable number of arguments?
You could then do:
[Teardown] | Run Keywords | Do Something | Do Something Else | Do Even more
Of course, this means you can't pass arguments to those other keywords.
Though, it seems like the best solution is just to support multiple
instances of a setting, which get run in order:
[Teardown] | Do Something
[Teardown] | Do Something Else
[Teardown] | Do Even More
That would require a bit of a fundamental change to how RIDE is
implemented, but RIDE limitations probably shouldn't drive the design
of robot.
You got this error because repeating the setting name on the next row
is an old syntax for continuing long rows in the setting table. What
you did is thus identical to this:
Test Teardown Cleanup Database
... Teardown Selenium
Note that continuing rows with three dots like in the example above is
the recommended way and that the old syntax will probably be
deprecated at some point.
> I find it a little ugly to create an extra keyword as a teardown
> keyword wrapper ;)
I agree that sometimes it's slightly annoying to create a new higher
level keyword when you just need to run two keywords in setup or
teardown. The good news is that if you need to add more keywords you
can add them to the same keyword. On the other hand I find it more
clear that setup and teardown are always just single keyword. That
also makes the framework, and RIDE, design considerably easier so at
least I'm not too interested to change this functionality.
Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
This keyword could be added easily. Not being able to use arguments
shouldn't be that big a problem because there is always a workaround
to create a new higher level keyword.
> Though, it seems like the best solution is just to support multiple
> instances of a setting, which get run in order:
>
> [Teardown] | Do Something
> [Teardown] | Do Something Else
> [Teardown] | Do Even More
>
> That would require a bit of a fundamental change to how RIDE is
> implemented, but RIDE limitations probably shouldn't drive the design
> of robot.
Together the changes to the internal models, running, logging, and
RIDE's UI would be quite big, and as a bonus documentation should be
updated too. Personally I don't think that's worth the effort, but if
someone else is interested in it I'm willing to review patches. Adding
the proposed `Run Keywords` keyword would be much easier.
I considered adding this so good idea that I just implemented it:
http://code.google.com/p/robotframework/issues/detail?id=572
http://robotframework.googlecode.com/svn/trunk/doc/libraries/BuiltIn.html#Run%20Keywords