I would like to perform the following simple task:
Open Application (notepad on desktop)
Type Into the notepad (I have done this via Attach Window and then inserting Type Into activity
I have used Sequence for the above tasks which was recommended as part of the Tutorial.
Screenshot of my flow as follows:
Problem:
The notepad was opened. However, Type Into was not executed on the opened notepad. The Type Into was only executed when I closed and re-opened the notepad. There seems to be a break between the Sequence but I am unable to figure out what. Please help.What have I missed out?
For Open Application and Attach Window, selector is
“wnd app=‘notepad.exe’ cls=‘Notepad’ title=‘Test - Notepad’ /”
For Open Application, file name is
“C:\windows\system32\notepad.exe”
@lakshman
I would like the robot to open the notepad as well. Would this be possible?
If only Attach Window activity were used, would this mean that the Notepad has to be opened manually before the robot can type in manually?
I plan to use this Sequence as part of a workflow. A Close Application will be added to the last step of Sequence but I had the same problem as above i.e. unable to close unless i re-opened the Notepad, so i figure the root cause could be similar and I should first solve the mentioned problem.
@lakshman
“Yes for this we can use open Application or Start Process Activity to open the file.”
Sorry if I misunderstood… but I did use Open Application as my first step of the Sequence - refer to screenshot in first thread. The robot executed Open Application but was not able to execute the second step Attach Window. I had to close the Notepad and re-open manually before the robot could execute the second step and Type Into activity.
Am I missing out on something in between the 2 steps within the Sequence?
Have you tried putting the Type Into activity into the Do section of the Open Application?
It’s possible that you do not even need the attach window at all. I’m wondering what the need for both Open and Attach together, usually that is not necessary.
Yes I have tried this method as well. I faced the same problem as well. The robot was able to execute Open Application but was not able to execute Type Into. The Notepad had to be closed and then re-opened manually before the Type Into can be executed. I was wondering if perhaps there is a missing output variable/link/connection between the 2 Activities which needed to specified …
Please ignore earlier post. I managed to have the robot execute second step Attach Window consecutively
I did so by having the Selectors in both Open Window and Attach Window replace the variable part with wild cards, as you have mentioned earlier.
I noticed that if wild card was not used in either Selector (or if it were not used at all), the next step could not be executed without manually triggering it. Perhaps this was the “connector” to the next step? If I may ask, what is the effect of the “wild card”?
I was looking into the Selector for your Type Into. How were you able to come up with the strings of code for the Selector? This seems diffrenet from the Open Application selector which was auto-populated upon clicking on image of the Notepad window.
Actually UiPath will identify the elements based on the selector. so, selectors are place major role here. If you want to work with more reliable then we have to pass either Wild card entries like ‘*’ or we can use variables into selector.
After indicated the screen, it took file name Test - Notepad into the selector and so it will work for the file which has name “Test” only. If you want to work with any notepad file we have to replace variable part with wildcard entries. Here, file name is the variable part.
I realized that a new text file was created under Open Application all along rather than the designated file, even though i had clicked on the opened Notepad when selecting image.
What if i wanted to open a specific text file? I indicated the file path of the designated file but received a error…
The file path which i indicated manually as below
Thanks for your help. I have resolved the issue you have mentioned. Currently facing an issue with file path. The robot had been opening a new text file rather than my intended text file all along…
Is the file name you have mentioned a generic file name for opening a new Notepad?
What if I wanted to open a specific Notepad file on my Desktop and the text file is named ‘‘test’’? The exact file path is: “C:\Users\chinhian\Desktop\test.txt”
Do I put it in the file path in the same manner as you have done (see below)?