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

Is there a way to set timeout on the string_found #87

Closed
sgonchigar opened this issue Nov 8, 2023 · 1 comment
Closed

Is there a way to set timeout on the string_found #87

sgonchigar opened this issue Nov 8, 2023 · 1 comment

Comments

@sgonchigar
Copy link

sgonchigar commented Nov 8, 2023

Hello, is there a way to set timeout on string_found(). Also, what would be a sure way to confirm that the screen buffer is loaded/received completely with timeout so we can gracefully end where needed. Some of the screens don't have any fields. We check for some text on the blank screen. It is taking unusually long time on those screens. Appreciate any help. Thank you for providing this utility.

can a timeout be set for this function,
def string_wait(string):
while True:
em.wait_for_field()
c = em.exec_command(b"Ascii()")
if string in b"\n".join(c.data).decode():
return

    em.exec_command(b"Wait(Output)")
@sgonchigar
Copy link
Author

found that Wait(Output) can take a timeout paramter. Wait(timeout,Output). Thank you.

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