Preventing browser launch when running in command line mode(cherry picked from commit f214cfd467defbb3166e4f24d43567abfd3dc142)