javascript - Hide user input in PhantomJS / CasperJS -


i have casperjs test suite in have fill login form user name , password. since don't want put password code did this:

system.stdout.writeline("please enter password:"); var password = system.stdin.readline(); this.fill('form:first-of-type',{     'username': user,     'password': password },true); 

this works, leaves password on console can read it. there way hide actual input view, or display ******** in place?

or there perhaps approach problem have missed?

edit: tried using execfile, doesn't when try run read, returns nothing ever happened. other external programs work fine.

i found crude workaround:

system.stdout.write("please enter password:"); var password = system.stdin.readline(); system.stdout.write("\033[1aplease enter password:                      \n"); 

will move cursor 1 line , print on password. problem remains, hides password after has been entered. if watching type, won't much. @ least won't visible on console later on.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -