Problem statement: For one of our automation, when the bot is launching Edge/Chrome, we are facing the issue with regards to “Restore pages”.
Solution is in the below link:
Problem statement: For one of our automation, when the bot is launching Edge/Chrome, we are facing the issue with regards to “Restore pages”.
Solution is in the below link:
Hello @viroop!
It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.
First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.
You can check out some of our resources directly, see below:
Always search first. It is the best way to quickly find your answer. Check out the icon for that.
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.
Topic that contains most common solutions with example project files can be found here.
Read our official documentation where you can find a lot of information and instructions about each of our products:
Watch the videos on our official YouTube channel for more visual tutorials.
Meet us and our users on our Community Slack and ask your question there.
Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.
Thank you for helping us build our UiPath Community!
Cheers from your friendly
Forum_Staff
Hello, I think it is a general problem of detecting a Pop-up window.
I tried a new project and used the Use Application/Browswer activity.
In a while loop, it’s an action System.Activities.Satements.Parallel
( the working condition is always True, but you can change this behavior)
This could be like another working thread, which runs a parallel process.
In a containig Group, I had added the Get Active Window action.
This action could be find in UIPath.Core.Activities.Get Active Window.
The idea is to compare the window title and then do the proper action.
This window text I get with Get Attribute from UIPath.UIAutomationNext.
hWnd is the variable name for the active window just previously set.
The atribute name is “title” and it is saved to a String text variable.
Please see the next picture:
In the next step, I had used an InvokeCode activity.
This activity can be find on UIPath.Core.Activities.InvokeCode.
This script has 2 input arguments, arg1 and arg2 and an out result.
Or simply, you can use more If statements, or a switch statement.
But the advantage of a script, is that you can keep a static variable.
You can set the output result as an integer value depending of title.
But only if the text has a different value, an output can be different.
The code ofthis script can look like this:
Static text As String
result = 0
If (arg1 <> text) Then
System.Console.WriteLine(arg1)
If arg1.Contains(“Explorer”) Then
result = 1
Else If arg1.Contains(“Chrome”) Then
result = 2
Else If arg1.Contains(“Calculator”) Then
result = 3
Else If arg1.Contains(“WordPad”) Then
result = 4
Else If arg1.Contains(“PlaceholderWindow”) Then
result = 5
Else If arg1.Contains(“UIPath StudioX Community”) Then
result = 6
End If
End If
text = arg1
Call arg2.Close
The arg2 can be a reference to the hWnd variable of the active window.
This window can be automatically closed, or you may comment this line.
Depending the result, you choose different actions in a switch statement.
As you can see, the window text can be the title of any running application.
If you run the Calculator, or the WordPad, you can see a new entry log.
Actually, the current active window could belong to any application.
Hope this can be of any help,
Adrian B.
Actually closing the window, can give an error, if the window is already closing.
So an error checking would be also necessary, to avoid this kind of error.
With fine regards, Adrian