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 334629 - selectevent doesn't work
selectevent doesn't work
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: general
unspecified
Other opensolaris
: Normal normal
: ---
Assigned To: Prashanth Mohan
LDTP maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-15 09:51 UTC by Patrick
Modified: 2006-07-21 17:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (3.04 KB, patch)
2006-03-16 04:54 UTC, Nagappan Alagappan
committed Details | Review
I have modified select_event to match the event name only with the summary and ignore the rest of the string. (4.25 KB, patch)
2006-07-21 17:49 UTC, Prashanth Mohan
committed Details | Review

Description Patrick 2006-03-15 09:51:26 UTC
steps:
1. In Evo DayView
2. Create a event named 'new summary'

In python
>>> selectevent ('frmEvolution-Calendars','calDayView','new summary')
selectevent ( frmEvolution-Calendars , calDayView , new summary )
*** Unable to select calendar event index
Traceback (most recent call last):
  • File "<stdin>", line 1 in ?
  • File "/usr/lib/python2.4/site-packages/ldtp.py", line 402 in selectevent
    raise LdtpExecutionError (str (msg))
ldtp.LdtpExecutionError: "'selectevent failed'"

Comment 1 Nagappan Alagappan 2006-03-16 04:54:54 UTC
Created attachment 61347 [details] [review]
Proposed patch

Patrick: With this patch, can you please try and update this bug ?
Comment 2 Nagappan Alagappan 2006-03-16 06:27:33 UTC
Poornima: With latest LDTP can you please check selectevent function
with the steps mentioned by Patrick and update this bug ?

Unfortunately, I'm unable to reproduce this bug due to my Evolution setup in
NLD10.
Comment 3 Patrick 2006-03-16 06:53:17 UTC
after apply your patch, selecteventindex work now.

>>> selectevent ('frmEvolution-Calendars','calDayView','new summary')
selectevent ( frmEvolution-Calendars , calDayView , new summary )
*** Unable to select calendar event based on name
Traceback (most recent call last):
  • File "<stdin>", line 1 in ?
  • File "/usr/lib/python2.4/site-packages/ldtp.py", line 402 in selectevent
    raise LdtpExecutionError (str (msg))
ldtp.LdtpExecutionError: "'selectevent failed'"
>>> selecteventindex('frmEvolution-Calendars','calDayView',1)
selecteventindex ( frmEvolution-Calendars , calDayView , 1 )
1
Comment 4 Nagappan Alagappan 2006-03-16 06:58:34 UTC
Start LDTP binary seperately in a console and before that, please run this command 'export LDTP_DEBUG=1' and paste the output of LDTP binary here.

In another console, run execute the following steps in python prompt

from ldtp import *
selectevent ('frmEvolution-Calendars','calDayView','new summary')
Comment 5 Nagappan Alagappan 2006-03-16 12:36:11 UTC
Patrick: Looks like all day event 'label / label_by' entry is not listed in accessibility ?

Note: Tested with Evolution 2.4.0 in SuSE Linux 10.0

CC: Evolution developers.
Comment 6 Nagappan Alagappan 2006-03-16 13:49:17 UTC
Harry: Apologize. With the help of Poornima <pnayak@novell.com> identified that Calendar Event label will be listed in accessibility as 'Calendar Event: Summary is <actual summary>.'.

One question here I have is, In localized version how this string will be displayed ? Localized version of 'Calendar Event: Summary is <actual summary>.' ?

Patrick: I hope in this case we may need to use the whole string 'Calendar Event: Summary is <actual summary>.' ? or the other way is we can use a pattern matching in the code, something like '*: *<actual summary>.' NOTE: I need to work out some exact regular expression.
Comment 7 Harry Lu 2006-03-16 14:23:59 UTC
In 
http://cvs.gnome.org/viewcvs/evolution/a11y/calendar/ea-cal-view-event.c?view=markup

You can have a look at ea_cal_view_event_get_name().

Yes, it is the localized version of 
"Calendar Event: Summary is %s."  or sth. similar.
Comment 8 Nagappan Alagappan 2006-03-16 16:53:28 UTC
Harry: This string is specific to evolution or commonly provided by gnome calendar for all the applications uses gnome-calendar ?

Patrick: If its common in gnome-calendar, then we need to add the regular expression based search of string in main LDTP, otherwise we need to have a function in evoutils directory under pyautosuite/evolution. What do you suggest ?
Comment 9 Nagappan Alagappan 2006-03-16 16:58:31 UTC
Patrick: In few Indian locale languages, the msgstr string does not contain ': Summary is %s.' and we have only 'Calendar view' equivalent string. So, how do we go about that, when we plan for localized testing ?
Comment 10 Patrick 2006-03-17 04:09:55 UTC
It's ok now if 'Calendar Event: Summary is <name>.' work. In localized test, we could use selecteventindex as a workaround but:

>>> selectevent ('frmEvolution-*','calDayView','Calendar Event: Summary is test.')
selectevent ( frmEvolution-* , calDayView , Calendar Event: Summary is test. )
*** Unable to select calendar event index
Traceback (most recent call last):
  • File "<stdin>", line 1 in ?
  • File "/usr/lib/python2.4/site-packages/ldtp.py", line 428 in selectevent
    raise LdtpExecutionError (str (msg))
ldtp.LdtpExecutionError: "'selectevent failed'"


Comment 11 Harry Lu 2006-03-17 04:57:11 UTC
(In reply to comment #8)
> Harry: This string is specific to evolution or commonly provided by gnome
> calendar for all the applications uses gnome-calendar ?
This is specific to evolution.
I never heard gnome-calendar before. What is it?

Comment 12 Nagappan Alagappan 2006-03-17 05:21:56 UTC
Patrick: Let me debug the issuer further based on comment #10.

Harry: I remember the key word gnome-calendar and after your question I googled ;)

and found few links....

http://mail.gnome.org/archives/gnome-list/2001-July/msg00208.html
http://mail.gnome.org/archives/calendar-list/1999-September/msg00012.html
http://www.collaborium.org/onsite/jos2000/related/guides/gnome/caluse.html
http://www.sdconsult.no/linux/gnome/gcal.html

and all of them are referring to Evolution Calendar.
Comment 13 Nagappan Alagappan 2006-03-17 05:52:10 UTC
Harry: For appointment with subject 'new summary', I get 'Calendar Event: Summary is new summary.   ' from Accessible_getName function call. Why three extra spaces at end ?

Harry: Also, For meeting with subject 'new meeting', I get 'Calendar Event: Summary is new meeting.   It is a meeting.' Here also three spaces in between and also extra some strings 'It is a meeting'. This string is not available for appointment. Will this be added for appointment too ?

Patrick: If I use 3 extra spaces at end of this it worked fine ;) Regular expression is not implemented here.
Comment 14 Harry Lu 2006-03-17 06:09:45 UTC
(In reply to comment #13)
> Harry: For appointment with subject 'new summary', I get 'Calendar Event:
> Summary is new summary.   ' from Accessible_getName function call. Why three
> extra spaces at end ?
> Harry: Also, For meeting with subject 'new meeting', I get 'Calendar Event:
> Summary is new meeting.   It is a meeting.' Here also three spaces in between
> and also extra some strings 'It is a meeting'. This string is not available for
> appointment. Will this be added for appointment too ?
As I said in comment 7, please take a look at the source code of ea_cal_view_event_get_name (), you will see where the spaces come from.
Comment 15 Nagappan Alagappan 2006-03-17 07:56:10 UTC
Patrick: 3 extra spaces we got because of 'name_string = g_strdup_printf ("%s %s %s %s", summary_string, alarm_string, recur_string, meeting_string);' this line in ea_cal_view_event_get_name function (ea-cal-view-event.c). And the space ordering will be different if we have alarms or recurrences.
Comment 16 Patrick 2006-03-17 08:48:25 UTC
Yes. nags, it's work but quite hard to use. if there is a event with alarm, recur, or meeting, the name will be very long or with strange space.
Comment 17 Nagappan Alagappan 2006-03-22 12:40:08 UTC
Reassigning to Patrick.
Comment 18 Prashanth Mohan 2006-07-21 17:49:00 UTC
Created attachment 69346 [details] [review]
I have modified select_event to match the event name only with the summary and ignore the rest of the string.

This should select the right event at most times (there is the rare case when the starting of the string alone is given, it will match that too.)