Can i read the text in the terminal?

I can not find any APIs to read the terminal content in TerminalWidget or TerminalService. Is there any way to read the text in the terminal? Please help.

@PeimingMo1 I don’t believe there is an API to read the terminal, the following issue explains a bit further:

Yeah i see, thank you.