Are you trying to use REFramework for an attended automation using UiPath Forms? There’s your problem. REFramework does not at all accommodate how UiPath Forms work. This posts may help you understand how to work with Forms, Triggers, etc.
https://forum.uipath.com/t/how-to-create-a-select-file-or-select-folder-element-in-new-uipath-forms/