Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 06 10:23
    vasily-v-ryabov commented #1232
  • Aug 06 10:22
    vasily-v-ryabov commented #1232
  • Aug 06 10:20
    vasily-v-ryabov commented #1232
  • Aug 06 09:16
    junkmd commented #1232
  • Aug 06 09:15
    junkmd commented #1232
  • Aug 06 09:15
    junkmd commented #1232
  • Aug 06 07:39
    vasily-v-ryabov commented #1232
  • Aug 06 07:27
    vasily-v-ryabov labeled #1228
  • Aug 04 12:46
    lsaadeh commented #469
  • Aug 02 14:07
    junkmd commented #1232
  • Aug 01 19:08
    codecov[bot] commented #1232
  • Aug 01 18:58
    codecov[bot] commented #1232
  • Aug 01 18:35
    codecov[bot] commented #1232
  • Aug 01 18:33
    codecov[bot] commented #1232
  • Aug 01 18:28
    codecov[bot] commented #1232
  • Aug 01 18:26
    codecov[bot] commented #1232
  • Aug 01 18:26
    codecov[bot] commented #1232
  • Aug 01 16:33
    codecov[bot] commented #1232
  • Aug 01 16:33
    codecov[bot] commented #1232
  • Aug 01 16:32
    junkmd synchronize #1232
LuffyKing
@LuffyKing
Allows u to input data
Eg
tedit.TypeKeys("input text")
@flenoir
Madhukar S Holla
@madhukar01
Hey all!
Is there any support by PyWin for Windows applications that have HTML embeddd UI
I've been trying to workaround coded ui but it's really terrible.
Vasily Ryabov
@vasily-v-ryabov
Hi @madhukar01 it depends on the engine used to render HTML embedded UI. To check if it's suitable for pywinauto, use Inspect.exe. The link to download can be found in the Getting Started Guide.
Sorry for delayed replies on the issues. A hot week.
Sripad Sahu
@sripad96_gitlab
hey,
if i use thi line i am getting error
dlg.Project.print_control_identifiers()
error is : raise ElementNotFoundError(kwargs)
pywinauto.findwindows.ElementNotFoundError: {'title_re': '.* Pix4Ddiscovey Non - Commercial', 'backend': 'uia', 'process': 2944}
any suggestions???
i am working on a project to automate a thirdparty app made on qt
but unable to use : dlg.File_tab.click(); dlg.child_window(title='Open', control_type='MenuItem', found_index=0).invoke(); etc like commands
any suggestions on where i might be going wrong or how to automate a 3rd party app made from QT using pywinauto
Vasily Ryabov
@vasily-v-ryabov
Hi @sripad96_gitlab for the first error it's not clear how dlg was defined. This is important, because it looks like dlg specification produced this error, not dlg.Project. For dlg.Project it would be something like ElementNotFoundError: {'best_match': 'Project', 'backend': 'uia', 'process': 2944}.
Menu item in a drop down submenu has some differences for Qt apps. It is often child of top-level window. Example for WireShark (which is Qt5 app): wireshark.py, line 58. Maybe .select() is more proper action for this menu item.
Sripad Sahu
@sripad96_gitlab
okay.. thank you....
I will look into the examples and try to solve it
one more doubt i had
how to switch tabs ????
Vasily Ryabov
@vasily-v-ryabov
I need to take a look. I have seen many cases for Qt apps where tabs are owner drawn. It might be a problem.
Vasily Ryabov
@vasily-v-ryabov
For WireShark it works this way: app.Wireshark_Capture_Interfaces.child_window(title="Input", control_type="TabItem").click_input() (not obvious, can be improved for Qt5 apps).
Vasily Ryabov
@vasily-v-ryabov
@sripad96_gitlab I've submitted an issue to keep it in mind for the future: pywinauto/pywinauto#561
Sripad Sahu
@sripad96_gitlab
@vasily-v-ryabov thank you. Yes few of the tab items are owner drawn so i have to use the click() function to access them, personally which i dont like. It would be very helpful if we can get some function to access the owner drawn items.
Vasily Ryabov
@vasily-v-ryabov
It’s very hard to work with owner drawn items. Some of them may need DLL injection with some Qt-specific stuff or other deep investigation. The result is not guaranteed anyway. The easiest workarounds are (1) image recognition (using “lackey” in Python) or click_input by coordinates relative to nearest recognized window/element on the same form which should be more reliable than screen-wide click.
Sripad Sahu
@sripad96_gitlab
okay
and is there any way i can get a list of all the options(items) available in the particular window?
Vasily Ryabov
@vasily-v-ryabov
There is parameter .click_input(coords=(x, y), absolute=False)
Sripad Sahu
@sripad96_gitlab
My aim is to create a JSON or config file with all the parameters as in the settings so that the automation becomees easy and versatile.
There is parameter .click_input(coords=(x, y), absolute=False) : i have tried this function only for the tab items
Vasily Ryabov
@vasily-v-ryabov
For the window specification there is method .print_control_identifiers(). It prints the whole hierarchy or by depth parameter.
If you need to walk the hierarchy programmatically, use .children() and .descendants().
Sripad Sahu
@sripad96_gitlab
print_control_identifiers() function only gives the control name and the class, i also want to know the state. for example : if there are few checkboxes and drip downs and radio buttons , i want to know which of them are selected and what are the options selected. My main motive is to automate it instead of manually writing the json or config file for the entire setting of the program
Vasily Ryabov
@vasily-v-ryabov
OK, then .children() is your choice. States can be retrieved by different methods of every control. It’s good idea to provide unified methods like .state() and/or .capabilities() returning dictionaries of properties. You’re always free to submit a pull request or issue about this. I can’t promise to assign high priority for now though.
Sripad Sahu
@sripad96_gitlab
i have a list of all the descendants in a list, now i want to segregate them according to their type, i.e: store them in different lists /tuple. But i am unable to access them since they are UIAwrapper object. Any idea how to achieve this?
Sripad Sahu
@sripad96_gitlab
dont bother got it
using descendants().get_element_info.name
what is the difference between children and descendants
???
Vasily Ryabov
@vasily-v-ryabov
children() are immediate children (1 level below). .descendants() is a whole sub tree as a plain list.
Sripad Sahu
@sripad96_gitlab
okay... thnak
Sripad Sahu
@sripad96_gitlab
top_window() function doesn't always return the top window ... so is there any other way to get that ... maybe a workaround
Vasily Ryabov
@vasily-v-ryabov
top_window() is not recommended since it creates window specification by handle of first top level window at the moment of creation.
Good way is app.window(active_only=True), but it assumes the window should be in focus.
Also for “uia” backend top window can be child of main form. In this case it should look like app.MainFormTitle.child_window(control_type=“window”, active_only=True).
Sripad Sahu
@sripad96_gitlab
that means i need to create a workaround to replace top_window()
Also for “uia” backend top window can be child of main form. In this case it should look like app.MainFormTitle.child_window(control_type=“window”, active_only=True).