question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`RPA.Windows` keyword `Windows Search` is too quick

See original GitHub issue

When using the Windows search keyword, depending on system performance and the status of the search index, Windows may take some time to find the object being searched for, but the sleep is after clicking {enter}. I believe that may be a bug, but in any case, we need to be able to set a sleep between entering the search term and clicking enter.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
blakewaudcommented, Oct 5, 2022

Do we really need a wait after clicking enter? The library has built in timeouts for finding elements, so theoretically, if you called Control window after Windows search, it should have the current global timeout to wait for the app to open… and you could set that before opening the app if you know the app is slow. Otherwise I agree and can look at this next after MSGraph.

0reactions
cmin764commented, Oct 6, 2022

You have a point here and technically this is desirable, but by design our wait_time philosophy here is the amount of seconds to sleep after a command completely finishes and that’s totally up to the user if he/she wants to override the default. Also there’s no guarantee that somebody will call Control Window (or anything related relying on timeouts) after such Windows Search execution, so maybe somebody just wants to open an app and at the same time set a sleep time long enough for the effect to be observed (before continuing with the rest of the statements), place where sleeping at the end of the command full execution (including Enter) makes sense.

Anyway, how would you improve this patch suggestion to make it even more versatile?

        self.ctx.send_keys(keys=search_cmd)
        self.ctx.send_keys(keys=text, interval=0.1, wait_time=wait_time)  # this is what solves the issue
        self.ctx.send_keys(keys="{Enter}")
        time.sleep(wait_time if wait_time is not None else self.ctx.wait_time)  # since we will allow default context time waits here as well (more flexibility)

Of course, the downside is that there are two identical sleeps now: one between finishing typing & pressing Enter and another at the end of the command chain.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Windows Search performance - Microsoft Learn
This article provides guidelines for troubleshooting poor Windows Search performance. Applies to: Windows 10 – all editions
Read more >
RPA.Desktop.Windows library | Robocorp documentation
Open application using Windows search dialog. Window title name is required to get handle on the application. Arguments. Argument, Type, Default value ...
Read more >
rpaframework/Windows.py at master - Desktop - GitHub
Open Using Run Dialog (uses Windows run dialog). - Open From Search (uses Windows search dialog). **Locators**. `Locator` is used to identify the...
Read more >
Microsoft's entry disrupts fast-growing RPA marketplace
By including Power Automate in Windows 10, Microsoft set off widespread industry speculation that it aggressively would corner the small to midsized business ......
Read more >
Why Is Windows 10 Search So Bad? Here Is How To Fix It
Windows 10 Search is so bad that it is known to be too slow and has features that do not work. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found