I’ve been wondering what is the correct method to set chrome as the active window.
Sequence is (1) open new tab, (2) write something using type text. Step 2 doesn’t work on this sequence. I’ve tried typing {ENTER} on it but still not working.
Click element works but I don’t want to use it for some reasons.
type text should always be the very vey last resort.
Use item.text and if that does not work, item.SendText
if you cannot avoid using typetext you must give the field you want to type into, focus first, and to do that, you need to use element click with “Virtual” set to false
One of my use case was to upload a file in GDrive using only OpenRPA.
Initial state:
• Chrome not yet opened
• Notepad as the focused application (may or may not have active app/window)
I occasionally see some Windows machines that do not respect using Windows APIs to give a window focus, but instead make it flash in the taskbar.
No one has ever been able to explain to me what they configured or installed to make Windows do that, so I cannot assist you in how to “fix it” except to say, this is NOT default Windows behavior. Hopefully, someone else on this forum has seen it and knows how to “revert it back” to proper Windows default?
ps: getting any element inside a window ( using get element under windows components ) should make openrpa try and give it focus, but generally you would simply get the window itself.
if you tried giving a chrome element focus, that is something completely different, that is about bringing the element into the viewport
That is super interesting. Can you give me the steps needed to reproduce that? Preferably only using default applications on a Windows machine, since I only have Windows and Visual Studio on my machine…