MCPcopy
hub / github.com/pdfarranger/pdfarranger / _import_file

Method _import_file

tests/test.py:333–343  ·  view source on GitHub ↗

Try to import a file with a file chooser and return that file chooser object

(self, filename, open_action=False)

Source from the content-addressed store, hash-verified

331 return self.__class__.pdfarranger.process
332
333 def _import_file(self, filename, open_action=False):
334 """Try to import a file with a file chooser and return that file chooser object"""
335 self._mainmenu("Open" if open_action else "Import")
336 filechooser = self._app().child(roleName='file chooser')
337 treeview = filechooser.child(roleName="table", name="Files")
338 treeview.keyCombo("<ctrl>L")
339 treeview.typeText(os.path.abspath(filename))
340 ob = filechooser.button("Open")
341 self._wait_cond(lambda: ob.sensitive)
342 ob.click()
343 return filechooser
344
345 def _save_as_chooser(self, filebasename, expected=None):
346 """

Callers 11

test_02_importMethod · 0.80
test_05_importMethod · 0.80
test_06_buggy_exifMethod · 0.80
test_02_openMethod · 0.80
test_03_open_againMethod · 0.80
test_03_import_pngMethod · 0.80
test_04_import_pngMethod · 0.80
test_03_import_pngMethod · 0.80

Calls 4

_mainmenuMethod · 0.95
_appMethod · 0.95
_wait_condMethod · 0.95
clickMethod · 0.45

Tested by

no test coverage detected