Convert Selenium Test Cases to Robot Framework.

790 views
Skip to first unread message

Skip Huffman

unread,
Jan 3, 2011, 10:39:38 AM1/3/11
to robotframe...@googlegroups.com
I don't want to out clever myself by making this more complicated than it should be.

Let's say I have a test case in Selenium that I would like to convert to robot framework native (with Selenium engine).

Case in Selenium is natively an HTML table in an HTML file.  I would like to convert it to a tab delimited text file preceding each line with "Call Selenium API"  so that each line is run and reported on separately.  (Rather than just convert en bloc to python and run with a single pass/fail).

I know that I could write a script to do this, but I suspect someone else has done the same thing, perhaps there is a standard process.

I would appreciate any suggestions, before I do this in a clumsy fashion.

Thanks,
Skip





Pekka Klärck

unread,
Jan 4, 2011, 11:35:13 AM1/4/11
to skiph...@gmail.com, robotframe...@googlegroups.com
2011/1/3 Skip Huffman <skiph...@gmail.com>:

> I don't want to out clever myself by making this more complicated than it
> should be.
>
> Let's say I have a test case in Selenium that I would like to convert to
> robot framework native (with Selenium engine).
>
> Case in Selenium is natively an HTML table in an HTML file.  I would like to
> convert it to a tab delimited text file preceding each line with "Call
> Selenium API"  so that each line is run and reported on separately.  (Rather
> than just convert en bloc to python and run with a single pass/fail).
>
> I know that I could write a script to do this, but I suspect someone else
> has done the same thing, perhaps there is a standard process.

At least I haven't heard about scripts for converting Selenese tests
to Robot format. Creating such a script shouldn't be too complicated,
but I'm afraid that tests using only Call Selenium API keyword would
be pretty low level and hard to understand and maintain. Making these
tests maintainable wouldn't probably be any easier that converting the
original Selenese into Robot format manually.

An obvious benefit of the automatic conversion, even if results
wouldn't be easily maintainable, would be that you could run all your
tests with Robot. An alternative solution to achieve that would be
adding a keyword to SeleniumLibrary that can execute Selenese tests. I
don't know does the Selenium RC support Selenese HTML format directly
or should SeleniumLibrary parse the table and then use Call Selenium
API internally. Even the latter approach would be slightly easier to
implement that creating a conversion script. Are you interested to
investigate this further and possibly implement such keyword?

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Reply all
Reply to author
Forward
0 new messages