After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 578123 - generatekeyevent fails for slash and colon characters
generatekeyevent fails for slash and colon characters
Status: RESOLVED WONTFIX
Product: LDTP
Classification: Other
Component: ldtp
unspecified
Other Linux
: Normal normal
: ---
Assigned To: LDTP maintainers
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2009-04-06 11:02 UTC by Javier Collado
Modified: 2018-09-11 19:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Javier Collado 2009-04-06 11:02:22 UTC
ldtp.generatekeyevent function doesn't seem to generate the correct sequence for some characters such as slash or colon.

For example, when testing firefox location bar:
>>> ldtp.launchapp("firefox"); ldtp.generatekeyevent("<ctrl>lhttp://www.gnome.org"); ldtp.gettextvalue("*Firefox", "txtLocation")

u'http\xd1--www.gnome.org'

Could that be related to the current keyboard layout?
Are there any escape sequence for those characters such as <slash> or <colon>?

Please let me know if there's any place in which all those escape sequences are listed (ldtp.py doesn't point to any place).
Comment 1 Nagappan Alagappan 2009-04-10 23:31:10 UTC
This works in Ubuntu 8.10 atleast like this when I tried in ipython prompt

In [3]: wait (2);generatekeyevent ("<ctrl>l");wait (1);generatekeyevent("<ctrl>lhttp://www.gnome.org");wait (1);gettextvalue("*Firefox", "txtLocation")
Out[3]: 1
Out[3]: 1
---------------------------------------------------------------------------
LdtpExecutionError                        Traceback (most recent call last)

/home/nags/work/ldtp/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/ldtp.py in gettextvalue(windowName, componentName, startPosition, endPosition)
    744         _responseStatus, _responseData = getresponse (_requestId)
    745         if _responseStatus [0] != 0:
--> 746             raise LdtpExecutionError (_responseStatus [1])
    747         return _responseData [1]
    748     except LdtpExecutionError, msg:

LdtpExecutionError: u'Unable to find object name in application map'

Thanks
Comment 2 Javier Collado 2009-04-13 10:23:04 UTC
Hello,

I'm afraid that in my machine your one line script it isn't working. As I pointed out in my previous comment, it might be related to using a different keyboard layout (spanish in my case).

Regarding the escape sequences, I guess there are no escape sequences for slash or colon, right?

Best regards,
    Javier
Comment 3 Nagappan Alagappan 2009-04-13 20:02:28 UTC
(In reply to comment #2)
> Hello,
> 
> I'm afraid that in my machine your one line script it isn't working. As I
> pointed out in my previous comment, it might be related to using a different
> keyboard layout (spanish in my case).

Not sure, how to reproduce in my scenario. Any inputs will be highly appreciated

> 
> Regarding the escape sequences, I guess there are no escape sequences for slash
> or colon, right?

Yes you are right

Thanks
Comment 4 Javier Collado 2009-04-17 09:39:51 UTC
Hello,

This is also happening in my virtual machines. It might take long time to setup the environment, but I would say that a regular installation with spanish keyboard would fail that way.

Best regards,
    Javier
Comment 5 Nagappan Alagappan 2009-04-17 14:14:16 UTC
(In reply to comment #4)
> This is also happening in my virtual machines. It might take long time to setup
> the environment, but I would say that a regular installation with spanish
> keyboard would fail that way.

Javier, If I set the keyboard input settings to Spanish is enough ? I can test it that way through Preferences->keyboard and in Keyboard Preferences application, Layouts tab. Correct me, if my assumption is wrong.

Thanks
Comment 6 Javier Collado 2009-04-22 07:30:18 UTC
Hello,

Yes, that should be enough. I've tried to switch my keyboard layout to UK and the generatekeyevent function has worked correctly so the problem is clearly related to the keyboard layout.

Best regards,
    Javier
Comment 7 Nagappan Alagappan 2009-05-11 15:22:13 UTC
(In reply to comment #6)
> Hello,
> 
> Yes, that should be enough. I've tried to switch my keyboard layout to UK and
> the generatekeyevent function has worked correctly so the problem is clearly
> related to the keyboard layout.

Sorry for my delayed response. Today I tried with Spanish keyboard layout settings, it seems to work fine. After selecting it, I have just applied the settings to system wide and I haven't logged out / logged in. Will this effect !?!

Thanks
Comment 8 Nagappan Alagappan 2009-08-14 02:03:30 UTC
Fixed in LDTP 1.7.0. Please verify the same.

Thanks for the bug report.
Comment 9 Javier Collado 2009-08-14 07:59:07 UTC
Hello Nagappan,

Thanks for solving the problem. I'll certainly verify it.

Best regards,
    Javier
Comment 10 Javier Collado 2009-10-08 08:49:08 UTC
I'm afraid this isn't solved yet. I've tested it in both ldtp-1.7.1 and ldtp-2.0.1
Comment 11 Nagappan Alagappan 2009-10-08 22:51:42 UTC
(In reply to comment #10)
> I'm afraid this isn't solved yet. I've tested it in both ldtp-1.7.1 and
> ldtp-2.0.1

Javier, can I get a VM to reproduce this issue ?

It was implemented with this - bug # 590755. Can you check that patch as well ?

Thanks
Comment 12 Nagappan Alagappan 2010-09-21 22:02:23 UTC
Javier, can you try with this and see if it works ?

http://ikester.blogspot.com/2007/01/im-huge-fan-of-autohotkey.html

If this works, then we should fix LDTP, maybe copy the way they do ;-)

Thanks
Comment 13 André Klapper 2018-09-11 19:53:15 UTC
LDTP has moved to Github. If the problem reported in this GNOME Bugzilla ticket still exists in a recent LDTP version, please feel free to report the issue at 
  https://github.com/ldtp/ldtp2/issues

Thanks for your understanding and we apologize for the inconvenience!