cancel
Showing results for 
Search instead for 
Did you mean: 

Parent document load in Browser automation

vigneshShankar
Level 4
Hello Everyone,

Is there any possible option to validate parent document or document load within browser automation scope?

Because in my automation, I have only one feasible to check with "element exist" that one also not worthwhile for some of the cases yet we have provided quite time on conditional wait stage. Can anyone help with that?


Thanks
Vignesh.s

------------------------------
vignesh Shankar
------------------------------
1 BEST ANSWER

Best Answers

Hi Vignesh,

Thanks for letting us know your version of Blue Prism. As per the official release notes of Blue Prism ver.6.9 which got released on September 2020, it has been stated that a new enhancement of introducing the Parent Document Loaded condition under wait stage was added as you can see from the below screenshot.

17969.png

Perhaps, this is why you are not able to see that option in your version 6.8. I did some research on your issue and there is a workaround that you can perhaps follow which as follows:

Go to you application modeller and create an element indicating the root HTML tag of your webpage as shown below:

17970.png
17971.png

Now, create two data items called 'JS Fragment' and 'JS Invoke Fragment' such that the initial value of 'JS Fragment' is as follows:

function CreateLoadedElement(){
var docLoaded = document.createElement("PageLoaded");
document.head.appendChild(docLoaded);
}

Now, set the initial value of 'JS Invoke Fragment' as:

window.onload = CreateLoadedElement();

Use a navigate stage where you drag the root HTML element and select the action as: 'Invoke Javascript Fragment' with the 'Fragment' parameter as the 'JS Fragment' data item value

17972.png

Now click on 'Add' button and add one more action for the root HTML element with same action as before: 'Insert Javascript Fragment' and the 'Fragment' parameter should now have the value of the data item 'JS Invoke Fragment' as shown below:

17973.png

Now use a wait stage with the same HTML root element and use the 'Check Exists' action:

17974.png

The shown workflow below is almost an equivalent of the Parent Document Loaded action which you can use in several ways. You can use this page in other pages where you actually want to invoke these set of actions:

17975.png



------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

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 it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

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

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

View answer in original post

3 REPLIES 3

Hi Vignesh,

In the spying mode, 'Browser' mode, we do have the 'Parent Document Loaded' action under wait conditions for any element that has been spied using the same. The 'Document Loaded' functionality was removed which used  to be present earlier in the 'HTML' mode. You can refer to the below sample workflow for the same:

17964.png

If you don't get this option in you Wait stage, then could you let me know which version of Blue Prism are you using and which browser you have been interacting with so that I can dig a bit further on the same.

NOTE: I am using the Blue Prism ver.6.10.4 along with Google Chrome browser in the above shown screenshot

------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

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 it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

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

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

Hi Devneet,

Thanks for your support on this issue. Unfortunaly, we can't able to see the parent document load option in wait stage.

We are using blue prism version 6.8.1 and with Google Chrome Browser..

Thanks
Vignesh.S

------------------------------
vignesh Shankar
------------------------------

Hi Vignesh,

Thanks for letting us know your version of Blue Prism. As per the official release notes of Blue Prism ver.6.9 which got released on September 2020, it has been stated that a new enhancement of introducing the Parent Document Loaded condition under wait stage was added as you can see from the below screenshot.

17969.png

Perhaps, this is why you are not able to see that option in your version 6.8. I did some research on your issue and there is a workaround that you can perhaps follow which as follows:

Go to you application modeller and create an element indicating the root HTML tag of your webpage as shown below:

17970.png
17971.png

Now, create two data items called 'JS Fragment' and 'JS Invoke Fragment' such that the initial value of 'JS Fragment' is as follows:

function CreateLoadedElement(){
var docLoaded = document.createElement("PageLoaded");
document.head.appendChild(docLoaded);
}

Now, set the initial value of 'JS Invoke Fragment' as:

window.onload = CreateLoadedElement();

Use a navigate stage where you drag the root HTML element and select the action as: 'Invoke Javascript Fragment' with the 'Fragment' parameter as the 'JS Fragment' data item value

17972.png

Now click on 'Add' button and add one more action for the root HTML element with same action as before: 'Insert Javascript Fragment' and the 'Fragment' parameter should now have the value of the data item 'JS Invoke Fragment' as shown below:

17973.png

Now use a wait stage with the same HTML root element and use the 'Check Exists' action:

17974.png

The shown workflow below is almost an equivalent of the Parent Document Loaded action which you can use in several ways. You can use this page in other pages where you actually want to invoke these set of actions:

17975.png



------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

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 it helps you out and if my solution resolves your query, then please provide a big thumbs up so that the others members in the community having similar problem statement can track the answer easily in future.

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

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