pywinauto_recorder.player.find_all

pywinauto_recorder.player.find_all(element_path=None, timeout=None)[source]

Finds all elements matching element_path.

Example of code using the ‘find_all’ function:
from pywinauto_recorder.player import UIPath, find, find_all
with UIPath("RegEx: .* Google Chrome$||Pane"):
        find().set_focus()
        wrapper_tab_list = find_all("*->RegEx: .*||TabItem") # Find all tabs.
        for wrapper_tab in wrapper_tab_list:
                wrapper_tab.click_input()
                wrapper_url = find("*->Address and search bar||Edit")
                print(wrapper_url.get_value())

The code above will click on all tabs of Google Chrome and print the URL of each tab. It will work only if the Google Chrome window is not minimized. The find_all() function is used to find all tabs.

Parameters
  • element_path (Union[str, UIAWrapper, NewType()(UI_Coordinates, (float, float)), None]) – element path

  • timeout (Optional[float]) – period of time in seconds that will be allowed to find the element

Return type

UIAWrapper

Returns

Pywinauto wrapper list of found elements

Raises

FailedSearch – if no element found