30-01-24 08:40 PM
Hi guys,
We have a web-based process involving MSEdge. We can launch MSEdge from both object and process studios.
However, when we try to run the process in the control room, the web-based MSEdge appears, but it's hiding after the screen which means does not pop up. I have to bring it up manually, so it can perform the tasks well, otherwise, it's terminated because of failure of spying elements and cannot perform tasks. I also have included the "activate window" and "verify" steps.
Can anyone explain what wrong with MSEdge and why it cannot be automatically pop up when running in the control room? And, how can I fix that problem when running in the control room?
Hence, the MSEdge's object is in foreground run mode, other objects are in background run mode.
------------------------------
Mia Mikela
------------------------------
Answered! Go to Answer.
02-02-24 04:44 PM
Hello Mia!
I understand, this behavior is quite strange. In this case, you can add the FOCUS action to each interaction element.
Alternatively, you can also map the WIN32 screen of the browser in a generic way and bring it to the foreground at the beginning of each action page of your object, in case you need to use attach in different applications.
Otherwise, include the bring-to-foreground action in your Attach action. This can help ensure consistency in interacting with the screens.
02-02-24 07:27 PM
Hi Wagner,
Thanks for your suggestions.
May I ask, what do you mean when you say include the bring-to-foreground action in your Attach action. - What step do I have to add? Can you please clarify? Thank you!
Here's my attach page and steps
------------------------------
Mia Mikela
------------------------------
02-02-24 10:21 PM
Hi Mia Mikela,
Below is the screenshot for Recovery and Resume stage added at the end of the Attach page.
In order to m move the applcation at the front of the screen you can also use C# to do that:
Use Get Process by name method and Set Foreground window to move the process at forefront
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.getprocessesbyname?view=net-8.0
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforegroundwindow
Attach page screenshot
------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"
Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
03-02-24 05:37 AM
Hi Harish, thanks for your suggestions. But I dont know C++ 🙂
So i can only rely on BP to do tasks.
May I ask, whether I should put Maximise step before or after the Activate step? I guess it doesn't matter.
*Since I have the Maximise step after the Activate step, which is not consistent. Sometimes it's working but sometimes it's not.
Shall I add focus/verify step before the activate step? So my work is Launch app - verify and/or focus the screen - activate - maximise.
04-02-24 03:09 PM
Hello,
Regarding the variation in when the browser is activated and when it is not activated, does an error occur? Or is it just not activated?
Checks if the page title changes between one execution and another: Product Management | Product Management (1) .
Regards,
04-02-24 07:18 PM
Hi ,
The Ms Edge is launched and no error. However, when I run the process in the control room, the Ms Edge screen is hidden and I have to manually bring the screen foreground.
05-02-24 07:53 AM
Hi Babjee,
Thanks for your suggestions, I have come up with your solution.
Here are my steps:
In the unhide window step, I put:
06-02-24 02:48 AM
Hi Babjee,
I have tried your suggestions but seem like it's not working tho.