def test_app_ref_from_pid(self): pid = _a11y.get_frontmost_pid() app_ref = NativeUIElement.getAppRefByPid(pid) assert "Application" in str(app_ref.ref)
def test_get_pid(self): pid = _a11y.get_frontmost_pid() app_ref = getAppRefByPid(pid) assert app_ref.pid == pid
def test_get_frontmost_pid(self): pid = _a11y.get_frontmost_pid() assert isinstance(pid, int) assert pid > 0