@@ -313,12 +313,6 @@ func (s SimulatorDevice) InstallWebDriverAgent(onProgress func(string)) error {
313313
314314 defer func () { _ = os .Remove (file ) }()
315315
316- utils .Verbose ("Downloaded WebDriverAgent to %s" , file )
317-
318- if onProgress != nil {
319- onProgress ("Installing WebDriverAgent" )
320- }
321-
322316 dir , err := utils .Unzip (file )
323317 if err != nil {
324318 return fmt .Errorf ("failed to unzip WebDriverAgent: %v" , err )
@@ -470,11 +464,16 @@ func (s *SimulatorDevice) StartAgent(config StartAgentConfig) error {
470464 return fmt .Errorf ("simulator is offline, use 'mobilecli device boot --device %s' to start the simulator" , s .UDID )
471465 case "Booting" :
472466 // simulator is already booting, just wait for it to finish
467+ if config .OnProgress != nil {
468+ config .OnProgress ("Waiting for Simulator to boot" )
469+ }
470+
473471 utils .Verbose ("Simulator is booting, waiting for boot to complete..." )
474472 output , err := runSimctl ("bootstatus" , s .UDID )
475473 if err != nil {
476474 return fmt .Errorf ("failed to wait for boot status: %w\n %s" , err , output )
477475 }
476+
478477 utils .Verbose ("Simulator booted successfully" )
479478 s .Simulator .State = "Booted"
480479 case "ShuttingDown" :
@@ -505,6 +504,10 @@ func (s *SimulatorDevice) StartAgent(config StartAgentConfig) error {
505504
506505 if ! installed {
507506 utils .Verbose ("WebdriverAgent is not installed. Will try to install now" )
507+ if config .OnProgress != nil {
508+ config .OnProgress ("Installing WebDriverAgent on Simulator" )
509+ }
510+
508511 err = s .InstallWebDriverAgent (config .OnProgress )
509512 if err != nil {
510513 return fmt .Errorf ("SimulatorDevice: failed to install WebDriverAgent: %v" , err )
@@ -514,7 +517,7 @@ func (s *SimulatorDevice) StartAgent(config StartAgentConfig) error {
514517 }
515518
516519 if config .OnProgress != nil {
517- config .OnProgress ("Launching WebDriverAgent" )
520+ config .OnProgress ("Starting WebDriverAgent" )
518521 }
519522
520523 // find available ports
0 commit comments