When there is an application where you deal with multiple windows, should you nest Attach Window activities? Or should you exit from the previous one and then add a new one each time so they won’t get nested?
I have a desktop application where I need to click on a button which will open Window A, on which I click another button, which will open Window B, on which I click another button, which will open Window C.
Kind of like:
Main Window
…-------Window A
…----------------Window B
…-----------------------Window C
So, the Window B and Window C are the child windows of Window A. The changes made in the child windows apply to Window A, the parent window.
In case like this, should I do:
Attach Window: Attach Window A {
… … … // Do some work
… … … Click: Click button to Open Window B
… … … Attach Window: Attach Window B {
… … … … … // Do some work
… … … … … Click: Click button to Open Window C
… … … … … Attach Window: Attach Window C {
… … … … … … … … // Do some work
… … … … … }
… … …}
}
Or
Attach Window: Attach Window A{
… // Do some work
… Click button to open Window B
} //Exit the Attach Window
Attach Window: Attach Window B{
… // Do some work
… Click button to open Window C
} //Exit the Attach Window
and so on?
Which one is considered better? Or Does it depend?
I would not next it and keep in inside one workflow… I would break it to three workflows as they are separate applications. Having all that in a nested way, and one below one will really make the workflows not developer friendly and it will be really hard to manage such code…
Don’t you think the best way would be to have a main workflow, and call the three workflows when needed… In each workflow, it will have it’s respective open and attach activities and the activities that come inside it…
Main workflow…
Invoke workflow for application 1
Invoke workflow for application 2
Invoke workflow for application 3
workflow for app 1
Open window 1
attach wndow
do the work
Workflow for app 2
Open window 2
attach window
do the work
I am not sure if I made myself understood in my question.
You cannot open Window B, until you have opened Window A. Window A has a button that opens Window B.
You cannot open Window C until you have opened Window B. Window B has a button that opens Window C.
So in order to open Window C, you have to have opened Window A, and then Window B in this order.
Hi @tomato25
hope you are doing well,its been long time talking to you
Fine, both the ways it would work buddy,
as the partial selector will for sure when it is placed inside a Full selector container,
or
as two different Full selector container
and its purely based on the complexity of the process. to go for the method we can use
–if each attach window has lot of sub windows and if we need to manage them at several stages along the process then we can keep them as separate attach window container, i.e, separate full selector container
or
–if its of easy kind to manage then we can use nested attach window activities like multiple partial selector container within full selector container
for example here you go with two xaml where one is with nested attach window and another one is of separate attach window
hope this would help you tom.zip (5.5 KB)
I have a question… Is is still valid and OK to nest attach window with UiPath.UiAutomation.Activities version 20.10 or higher? It seems that since this version it is not working properly or UiPath has changed approach…
In Version 20.10 UiPath has introduced modern experience and Object repository…