cancel
Showing results for 
Search instead for 
Did you mean: 

Window Title

MarinaDutta
Level 5
Dear All,

I need a help in 'How to get the window title' in Blue Prism. I am using a workflow where "If it is not connected" it should attached "Attach Window " but after 5 retries also it is unable to Attach the window when the "Is Connected " decision is No. I

Kindly help on this .

1098.png 

1099.png1100.png
1101.png

1102.png

------------------------------
Marina Dutta
------------------------------
1 BEST ANSWER

Helpful Answers

Hi Marina,

In order to get the windows title from any application, you would need to get the 'Windows Text' attribute from the Win32 spied element as you can see below:

959.png
Here is an attribute whose name is 'Window Text'. You can use a Read Stage and use this element spied with Win32 mode. Note that this should be your entire outer window of the application. You can pass the input parameter called as 'Attribute Name' as 'Window Text' and assign a data item to store the result as shown below:

960.png961.png

This is how you get the Windows Text for any application. Coming to your workflow, the issue lies most likely because you are not launching the application once the attach fails in your workflow:

962.png

As a best practice I wont recommend using retries in your business object. Instead try to attach of that fails try to launch. If your launch fails, throw your own custom exception message or rethrow the same as I have show above. In the page where you call this action, you can recover from the error, check if the error counter is less than max retries. If yes, then, increment the current retry count and use 'Kill Action' action and then again try for the same or else throw the exception out. Keep the retries in the sub page of your process than in the object layer.

963.png
The reason you should not nest the retires with object layer is so that they do not keep on multiplying like 3X3 = 9 times.


------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

12 REPLIES 12

PabloSarabia
Level 11
Hi Marina,

Check if this helps you:

949.png

Similar to your Process Flow. But, if I try to attach the window and it fails I kill the browser process and Launch it again.

For Kill the process use the "Kill Process" Function of the "Utility - Environment". (In my case I use Firefox) 

950.png


The problem you have is that you don't re-launch the browser



Hope this helps you


Bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------

Hi Marina,

In order to get the windows title from any application, you would need to get the 'Windows Text' attribute from the Win32 spied element as you can see below:

959.png
Here is an attribute whose name is 'Window Text'. You can use a Read Stage and use this element spied with Win32 mode. Note that this should be your entire outer window of the application. You can pass the input parameter called as 'Attribute Name' as 'Window Text' and assign a data item to store the result as shown below:

960.png961.png

This is how you get the Windows Text for any application. Coming to your workflow, the issue lies most likely because you are not launching the application once the attach fails in your workflow:

962.png

As a best practice I wont recommend using retries in your business object. Instead try to attach of that fails try to launch. If your launch fails, throw your own custom exception message or rethrow the same as I have show above. In the page where you call this action, you can recover from the error, check if the error counter is less than max retries. If yes, then, increment the current retry count and use 'Kill Action' action and then again try for the same or else throw the exception out. Keep the retries in the sub page of your process than in the object layer.

963.png
The reason you should not nest the retires with object layer is so that they do not keep on multiplying like 3X3 = 9 times.


------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi Devneet,

Thank You for your explanation. However when I tried to spy the application ,I am facing a problem while spying for win 32 mode. I am getting an error while spying for Win 32 mode.

969.png

------------------------------
Marina Dutta
------------------------------

Hi Marina,

Can you confirm once if you are selecting the windows area as shown in the screenshot below or not. You need to select the entire Application frame and not the inner window. Upon spying you will get attributes as shown below:

980.png
981.png

As you can see, the Windows Text is being populated upon spying. Also, check once the App Modeller Setting which you can see while selecting your root element. Verify if the settings are similar to what i have shown below:

982.png

------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi Devneet. 

I closed all the chrome application ,also restarted  my pc and  then ran the bot and now it is working fine  but in the launch application it is login two BP Travel-Log In page instead of one. 


996.pngThank You

------------------------------
Marina Dutta
------------------------------

Hi Devneet,

In the calculation stage "Is updated "  what should we put in the expression . Do we need to put the output flag of Read Connection action.?

Thanks & Regards,
Marina

------------------------------
Marina Dutta
------------------------------

Hi Marina,

It's looks like that you have "on startup" setting of your browser the option "Continue where you left off". Try checking "Open a specific page or set of pages"

1021.png
When you close the browser and launch it again, you can navigate directly in the first tab.


Hope this helps you 🙂


Bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
634726270
------------------------------

Hey Marina,

You can ignore that calculation stage if you want as it is not really required. I have a practice of updating items on the go, hence I put that and you are correct I am making the 'Is Connected' flag as True. Also, regarding your last issue do also clear the caches and check if this issue is resolved.

------------------------------
----------------------------------

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Thank You Pablo. Its working now

------------------------------
Marina Dutta
------------------------------