licanhua / YWinAppDriver

A open source project provides WinAppDriver compatible functionality
MIT License
49 stars 10 forks source link

Nothing appears in the WinAppdriver.exe console window when executing the window #3

Closed anunay1 closed 2 years ago

anunay1 commented 3 years ago

I executed the calculator test but nothing appears in the console window when the tests are executed. Is it expected.

licanhua commented 3 years ago

Yes. I didn't provide log function yet

anunay1 commented 3 years ago

It will be a good idea to log the same to a file and also I observed that the execution is slow

licanhua commented 3 years ago

You are right. Log is important. I also notice the slow. I didn't implement the cache for search yet. actually WinUI cached by class/name and others

licanhua commented 3 years ago

Thanks to report this issue. now the performance problem is fixed. I added the cache, also changed the click action to invoke.

anunay1 commented 3 years ago

Thanks will test it and let you know

anunay1 commented 3 years ago

And verified that the logs are displayed on the console, but is there any log file that gets generated.

licanhua commented 3 years ago

no. but easy for you if you are using powershell to tee the output to a file, also show output in console.

PS C:\repo\YWinAppDriver\src\WinAppDriver\bin\Debug\netcoreapp3.1>.\WinAppDriver.exe --urls http://127.0.0.1:4723 |tee -filepath test.out

licanhua commented 3 years ago

I just add code to generate logs to Logs/WinAppDriver-{Date}.txt Please pay attention that if you are running from VS, there is no log files. You can remove this restriction by

      if (env.IsDevelopment())
      {
        app.UseDeveloperExceptionPage();
      }
      else
      {
        loggerFactory.AddFile("Logs/WinAppDriver-{Date}.txt");
      }
anunay1 commented 3 years ago

Thanks will check that