Added clear command for type command
Implemented waitForText