The point @Divyashreem and @pathrudu are trying to make is that there’s no way for your BOT to know when you’re done entering your input data. It might end up pressing “Okay” when you’re still typing.
Also, your BOT can’t automatically click on those buttons on either of the mentioned pop-up boxes. For that, you’d need another BOT to monitor your current BOT, and that won’t be a feasible approach.
As I said earlier, there’s a reason why those activities are the way they are. You use such activities when the automation involves a Front-office/Attended BOT i.e. a BOT that executes on a user’s local workstation and requires some human intervention.