Bug 492784 - ContextMenu: MenuItem is missing "focused" and "selected" state when using AtkSelection
Summary: ContextMenu: MenuItem is missing "focused" and "selected" state when using At...
Status: NEW
Alias: None
Product: UI Automation
Classification: Mono
Component: Winforms - General (show other bugs)
Version: Release 1.0
Hardware: i686 openSUSE 11.1
: P5 - None : Normal
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-07 10:24 UTC by Neville Gao
Modified: 2009-07-02 03:48 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
at-spi sample. (893 bytes, text/x-python)
2009-04-07 10:24 UTC, Neville Gao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neville Gao 2009-04-07 10:24:20 UTC
Created attachment 284443 [details]
at-spi sample.

PROBLEM STATEMENT:

Menuitem in ContextMenu is missing "focused" and "selected" state when using
AtkSelection. The attached sample codes are as follows:

#!/usr/bin/env python

import pyatspi
import time

reg = pyatspi.Registry
find = pyatspi.findDescendant
findAll = pyatspi.findAllDescendants

desktop = reg.getDesktop(0)
ipy = find(desktop, lambda x: x.name == 'ipy' and x.getRoleName() == 'application')
frame = find(ipy, lambda x: x.getRoleName() == 'frame')
label = find(frame, lambda x: x.getRoleName() == 'label')

extents = label.queryComponent().getExtents(pyatspi.DESKTOP_COORDS)
x = extents.x + (extents.width / 2)
y = extents.y + (extents.height / 2)

# open context menu strip
reg.generateMouseEvent(x, y, pyatspi.MOUSE_B3C)
time.sleep(1)

context_menu = find(ipy, lambda x: x.getRoleName() == 'window')
menu = find(ipy, lambda x: x.getRoleName() == 'menu')
menu_item = find(context_menu, lambda x: x.name == 'Item 1')

menu.querySelection().selectChild(0)
time.sleep(1)

print 'Item 1 States: %s' % menu_item.getState().getStates()


REPRO:

1. Run uia2atk/test/sample/contextmenu_menuitem.py.
2. Run attached pyatspi sample.


RESULTS:

Item 1 States: [STATE_ENABLED, STATE_FOCUSABLE, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE]


EXPECTED RESULTS:

Item 1 States: [STATE_ENABLED, STATE_FOCUSABLE, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE, STATE_FOCUSED, STATE_SELECTED]