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

Already opened visualizer leads to PyWinAuto ElementAmbiguousError #13

Open
seanschneeweiss opened this issue Jan 25, 2022 · 0 comments

Comments

@seanschneeweiss
Copy link
Owner

If the visualizer is already opened, the GuiControl cannot maximize the window as two windows are identified (expected only a single window).

Traceback (most recent call last):
  File "app/main.py", line 9, in <module>
    main()
  File "app/main.py", line 5, in main
    LeapGui.run()
  File "E:\RoSeMotion\app\LeapGui.py", line 466, in run
    gui.set_windows_record()
  File "E:\RoSeMotion\app\GuiControl.py", line 24, in set_windows_record
    visualizer_dlg.maximize()
  File "E:\python372\lib\site-packages\pywinauto\application.py", line 396, in __getattribute__
    ctrls = self.__resolve_control(self.criteria)
  File "E:\python372\lib\site-packages\pywinauto\application.py", line 258, in __resolve_control
    criteria)
  File "E:\python372\lib\site-packages\pywinauto\timings.py", line 436, in wait_until_passes
    func_val = func(*args, **kwargs)
  File "E:\python372\lib\site-packages\pywinauto\application.py", line 203, in __get_ctrl
    dialog = self.backend.generic_wrapper_class(findwindows.find_element(**criteria[0]))
  File "E:\python372\lib\site-packages\pywinauto\findwindows.py", line 98, in find_element
    raise exception
pywinauto.findwindows.ElementAmbiguousError: There are 2 elements that match the criteria {'backend': 'win32', 'process': 3880}

Originally posted by @iamfoolberg in #12 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant