|
Bugzilla – Full Text Bug Listing |
| Summary: | FileDialog: do click action for 'Details' menu item crash the application | ||
|---|---|---|---|
| Product: | [Mono] UI Automation | Reporter: | calen chen <cachen> |
| Component: | Winforms - General | Assignee: | E-mail List <mono-a11y-bugs> |
| Status: | REOPENED --- | QA Contact: | Michael Gorse <mgorse> |
| Severity: | Critical | ||
| Priority: | P2 - High | CC: | mgorse |
| Version: | Release 1.0 | ||
| Target Milestone: | --- | ||
| Hardware: | x86 | ||
| OS: | openSUSE 11.1 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
python script to run click action
crash exception new python script python script that works on my machine |
||
|
Description
calen chen
2009-06-09 10:01:15 UTC
Created attachment 296898 [details]
python script to run click action
Created attachment 296899 [details]
crash exception
(In reply to comment #0) > REPRO: > > 1. run uia2atk/test/samples/savefiledialog.py, click 'Click me' to invoke 'Save > As' dialog > 2. run the attachment python script, which perform 'click' action for view > style dropdown toggle button from toolbar on the top right side, and perform > 'click' action for 'Details' menu_item I guess you're missing a step between 1 and 2, which is "click on the 'click me' button", right? Otherwise I get this python exception when running the script: Traceback (most recent call last): File "script4bug.py", line 15, in <module> toggle_button = pyatspi.findDescendant(save_dialog, lambda x: x.name == '' and x.getRoleName() == 'toggle button') File "/usr/lib/python2.5/site-packages/pyatspi/utils.py", line 173, in findDescendant for child in acc: TypeError: 'NoneType' object is not iterable > 3. wait some minutes( How many minutes? I've waited 10 and I didn't get the exception. Anyway, there's a chance that a recent commit did also fix this, because the exception mentions "HandlePossiblePreExistingProvider", and the fix in r137460 (trunk) prevents this to happen in a lot of situations. So I'm marking this as FIXED. Please check, and mark as VERIFIED accordingly. Thanks! I run the script on two computer 7 times, and every time the script can get the menu item's states correctly, and do the same action on GUI, also can't crash the app. the output on the console: [menu item | Small Icon]: [STATE_ENABLED, STATE_FOCUSABLE, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE] [menu item | Tiles]: [STATE_ENABLED, STATE_FOCUSABLE, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE] [menu item | Large Icon]: [STATE_ENABLED, STATE_FOCUSABLE, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE] [menu item | List]: [STATE_ENABLED, STATE_FOCUSABLE, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE] [menu item | Details]: [STATE_ENABLED, STATE_FOCUSABLE, STATE_SELECTABLE, STATE_SENSITIVE, STATE_SHOWING, STATE_VISIBLE] I will mark it as invalid. Hi Andres, Sorry I need reopen this bug for you because we still can reproduce it in both Felicia and my machines, I will try to describe it clearly :) REPRO: 1. run uia2atk/test/samples/savefiledialog.py, 2. on GUI, click 'Click me' to invoke 'Save As' dialog, (btw,I have mentioned this step in original REPRO) 3. run the new attachment python script, which perform 'click' action for view style dropdown toggle button from toolbar on the top right side, and perform 'click' action for 'Details' menu_item, and will print "click Detail to change view style" 4. after step 3 is finished, back to GUI, you will see TreeTable is refreshed but not completely that still have many cells are missing with blank empty 5. click the TreeTable RESULTS: like mentioned in step4, after click the TreeTable that the application is crashed EXPECTED RESULTS: after perform 'click' action for 'Detail' that cells in the TreeTable should be refreshed quickly and doesn't crash the application COMMENTS: Verify in rpm version: mono-uia-132785-276 uiautomationwinforms-137705-679 uiaatkbridge-137705-670 I agree with Calen if add the step 5, the GUI will crash, but on my computer the TreeTable never be refreshed. (In reply to comment #5) > 2. on GUI, click 'Click me' to invoke 'Save As' dialog, (btw,I have mentioned > this step in original You're right Calen, sorry that I mislooked it. However, I'm having a hard time trying to reproduce this one. For some reason, findDescendant calls get blocked sometimes, and this makes me unable to reproduce the issue with the script attached. I've tried to convert the python script to an Accerciser's IPythonConsole script: import time;acc.getChildAtIndex(1).getChildAtIndex(0).getChildAtIndex(3).getChildAtIndex(1).queryAction().doAction(0);time.sleep(4);acc.getChildAtIndex(2).getChildAtIndex(0).getChildAtIndex(4).queryAction().doAction(0) But for some reason, it doesn't work either (with this at least I get the details dropdown shown, but it doesn't manage to select the last option :( ) Can you figure out another way to do this? Created attachment 304865 [details] new python script Ipython doesn't work for me too, it return False when doing click action for menu_item in window. I update my python script to remove 'name' judgement from finding 'toggle button', I assume if because of the wrong 'name'. Please follow the REPRO in Comment #5 to run the new attachment script, if the script doesn't doing click action for 'Detail' menu_item, you can close the dialog and click 'Click me' to open the dialog again, then rerun the script(I am not sure why sometimes click action doesn't work for menu_item, and this issue is not reproduce each time). Created attachment 305073 [details]
python script that works on my machine
Ok, managed to create a python script that works for me, with the following modifications:
1) Use True as a third parameter to the function findDescendant(), at least to find the child "ipy", because it's faster (it does a non-depth-first order search). This is a general recommendation for all your python scripts.
2) Don't use findDescendant() when looking for elements inside ipy. This is a bit hacky and is not recommended for your scripts, just for people who have problems with findDescendant().
|