Is there api like 'expect ' and 'send' in shell script

as title said, is haxe have some api like that?

I try to use process.stdin.writeString but not work.