Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: handle both Save and Save All dialogs #100

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/test_thunderbird.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,14 @@ def receive_message(tb, signed=False, encrypted=False, attachment=None):
# for some reasons some Thunderbird versions do not expose 'Attach File'
# dialog through accessibility API, use xdotool instead
save_as = tb.app.findChild(
GenericPredicate(name='Save All Attachments',
GenericPredicate(name='Save All Attachments|Save Attachment',
roleName='file chooser'))
click(*save_as.childNamed('Home').position)
click(*save_as.childNamed('Desktop').position)
save_as.childNamed('Open').doActionNamed('click')
if save_as.name == 'Save Attachment':
save_as.childNamed('Save').doActionNamed('click')
else:
save_as.childNamed('Open').doActionNamed('click')
# save_as = tb.app.dialog('Save .*Attachment.*')
# places = save_as.child(roleName='table',
# name='Places')
Expand Down