then promise should be wait to quit browser