Hi again @miriam_ong,
I do not have jupyter currently installed so I cannot guide you further with “Attach Browser”, but this script will work in UiPath, you will have to change the folder path, ignore the .replace if you give the correct folder path.
$YourProjectFolder = 'C:\Users\USER\Downloads\'.Replace('USER', $env:UserName)
cd $YourProjectFolder
try{
jupyter notebook
$out_Message = 'Jupyter notebook opened'}
catch {
$out_Message = 'An error occurred: ' + $_
}
$out_Message
This script will send a message back saying whether jupyter notebook has opened, which you can use to attach the browser using "Attach Browser"
activity.
The script does the same steps I mentioned in the earlier post but with some success / failure message strings.
$_
returns the error message in PowerShell in the catch block
The type argument in Invoke PowerShell activity needs to be a string and IsScript needs to be checked as shown below.
Sample workflow:
OpenJupyterNotebook.xaml (6.2 KB)
Hope this helps.