Problems with german "Umlauts" in Selenium 2.2.2 library?

572 views
Skip to first unread message

Thomas Jaspers

unread,
Dec 8, 2009, 9:56:00 AM12/8/09
to robotframework-users
Hi,

I had some problems with german Umlauts earlier, but they have been
fixed when switching to
newer version of Jython. Actually I have been using those Umlauts
without any problems lately
in a project, but there I have been implementing the corresponding
keywords in Java based on
Selenium-API.

Now I am using Robot Selenium Library and I cannot get this to work
somehow. I keep getting
errors like:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
position 26:
ordinal not in range(128)

Could this be a problem in the Robot Selenium Library?

Any help is highly appreciated as this could be a showstopper soon ...

Thanks & Cheers
- Thomas

Pekka Klärck

unread,
Dec 9, 2009, 5:35:08 PM12/9/09
to jas...@codecentric.de, robotframework-users
2009/12/8 Thomas Jaspers <jas...@codecentric.de>:
>
> I had some problems with german Umlauts earlier, but they have been
> fixed when switching to
> newer version of Jython. Actually I have been using those Umlauts
> without any problems lately
> in a project, but there I have been implementing the corresponding
> keywords in Java based on
> Selenium-API.
>
> Now I am using Robot Selenium Library and I cannot get this to work
> somehow. I keep getting
> errors like:
>
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in
> position 26:
>  ordinal not in range(128)
>
> Could this be a problem in the Robot Selenium Library?

It could easily be a bug either in the library or in the framework but
it might also be a problem in your data. Unicode has been a problem on
Jython and due to Jython bugs everything still doesn't work correctly.
Without more information it's pretty hard to tell where the actual
problem could be. Could you give some more information about your
environment (OS, interpreter, versions, ...) and preferably also an
example test that demonstrates this problem? The example should be as
simple as possible an should not contain any confidential data
(although that wouldn't really my problem =). Instead of sending all
this information here it might be better to submit an issue about this
either to SeleniumLibrary's or core framework's issue tracker.

> Any help is highly appreciated as this could be a showstopper soon ...

If you provide more information hopefully we can help.

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

Thomas Jaspers

unread,
Dec 10, 2009, 10:04:32 AM12/10/09
to robotframework-users
Next week I can create an example I can send without problems ;).

Until then here some infos on my system:

C:\Dokumente und Einstellungen\tja>pybot --version
Robot Framework 2.1.2 (Python 2.6.2 on win32)

C:\Dokumente und Einstellungen\tja>jybot --version
Robot Framework 2.1.2 (Jython 2.5.0 on java1.6.0_12)

Operating system is Windows XP (German) and I am using the Jython-
Version
of Robot Framework.

Anyone ever succeeded in using an Umlaut (öäü) with RF Selenium
Library?
Then I would at least know that this is a local problem :-).

Thanks and Cheers
- Thomas

On 9 Dez., 23:35, Pekka Klärck <pekka.kla...@gmail.com> wrote:
> 2009/12/8 Thomas Jaspers <jasp...@codecentric.de>:

Pekka Klärck

unread,
Dec 10, 2009, 4:59:13 PM12/10/09
to jas...@codecentric.de, robotframework-users
2009/12/10 Thomas Jaspers <jas...@codecentric.de>:
> Next week I can create an example I can send without problems ;).

Great. That will definitely help.

> Until then here some infos on my system:
>
> C:\Dokumente und Einstellungen\tja>pybot --version
> Robot Framework 2.1.2 (Python 2.6.2 on win32)
>
> C:\Dokumente und Einstellungen\tja>jybot --version
> Robot Framework 2.1.2 (Jython 2.5.0 on java1.6.0_12)
>
> Operating system is Windows XP (German) and I am using the Jython-
> Version
> of Robot Framework.

Have you tried the same tests using Python interpreter instead of Jython?

Cheers,
.peke

Thomas Jaspers

unread,
Dec 11, 2009, 2:37:19 AM12/11/09
to robotframework-users
Hi Pekka,

using pybot instead of jybot was a really good idea ... then it
works.
I was somehow starting this writing my own Selenium keywords in Java
and thus I was using jybot. When I then switched to the Robot Library
I
kept it like that ... stupid me ;).

That really helps me a lot as it means that it works ok ... it is of
course
not so nice, that I cannot mix this now with additional keywords in
Java ...
maybe it is time to take a closer look at Python :-).

Thanks again and
Cheers
- Thomas


On 10 Dez., 22:59, Pekka Klärck <pekka.kla...@gmail.com> wrote:
> 2009/12/10 Thomas Jaspers <jasp...@codecentric.de>:

Pekka Klärck

unread,
Dec 11, 2009, 4:03:35 AM12/11/09
to jas...@codecentric.de, robotframework-users
2009/12/11 Thomas Jaspers <jas...@codecentric.de>:
>
> using pybot instead of jybot was a really good idea ... then it
> works.
> I was somehow starting this writing my own Selenium keywords in Java
> and thus I was using jybot. When I then switched to the Robot Library
> I kept it like that ... stupid me ;).

It's good that using Python instead of Jython solved the problem, but
it also means there's a Unicode bug either in the SeleniumLibrary or
in the core framework when using Jython. It would be nice if you had
time to investigate this a bit further and create and a simple example
demonstrating the problem.

> That really helps me a lot as it means that it works ok ... it is of course
> not so nice, that I cannot mix this now with additional keywords in Java ...

Although I prefer running tests on Python because it's faster and
there should be no issues with Unicode, being able to use either is
better because then you can included a library that requires
Java/Jython. This is definitely a good enough reason to fix the
original issue.

> maybe it is time to take a closer look at Python :-).

That might be nevertheless be a good idea. Python is definitely nicer
for scripting tasks and for creating simple test libraries than Java
and at least I'm happy using it for building bigger applications too.
A good place to start is our tutorial that covers the issues most
important when creating test libraries and has references to other
material:
http://code.google.com/p/robotframework/wiki/PythonTutorial

Cheers,
.peke

Thomas Jaspers

unread,
Jan 22, 2010, 3:10:06 AM1/22/10
to robotframework-users
Final solution for the jybot problem was updating Jython from 2.5.0 to
2.5.1.

Cheers
- Thomas

Pekka Klärck

unread,
Jan 22, 2010, 6:25:07 AM1/22/10
to jas...@codecentric.de, robotframework-users
2010/1/22 Thomas Jaspers <jas...@codecentric.de>:

> Final solution for the jybot problem was updating Jython from 2.5.0 to
> 2.5.1.

Great! It's good to hear that Jython 2.5.1 works better especially
when we are making it the minimum supported Jython version starting
from the next major Robot Framework release.

If you find any problems using Jython 2.5.1, please submit issues
either to RF's tracker or to http://bugs.jython.org/.

Reply all
Reply to author
Forward
0 new messages