Forum Discussion

ChandanD's avatar
ChandanD
Contributor
5 years ago

Unable to type app name in search box in Windows 10 search button

Hello,

 

I am trying to search application name using search button in Windows 10 but I am unable to select the object.

I also tried recording the script but still unable to type the application name.

Below is the script 

var search=Aliases.explorer.wndShell_TrayWnd.TrayButton // Search icon on system tray
search.Click();

 

Could you please let me know how to enter the application name.

  • This works for me:

      let appName = 'myApplication';
      Sys.Desktop.Keys('[Win]');
      Sys.Process("explorer").Window("DV2ControlHost", "Start menu", 1).Window("Edit", "", 1).Keys(appName + '[P500]');
      let check = Sys.Process("explorer").Window("DV2ControlHost", "Start menu", 1).Window("SysListView32", "S", 1);
      while (check.wItem(0,0) == "Recherche...") {
        aqUtils.Delay(500);
        check.Refresh();
      }  
      if (check.wItem(0,0) == 'Aucun élément ne correspond à votre recherche.')
        Log.Message('Application ' + appName + ' not found');

     

    So first i call Windows button.

    After i enter name of the app to find with a short pause ([P500]) that allows the search start.

    After i wait while searching label is displayed.

    After i check if the not found label is displayed.

     

    "Recherche..." and "Aucun élément ne correspond à votre recherche." are language dependant.

     

     

  • BenoitB's avatar
    BenoitB
    Community Hero

    This works for me:

      let appName = 'myApplication';
      Sys.Desktop.Keys('[Win]');
      Sys.Process("explorer").Window("DV2ControlHost", "Start menu", 1).Window("Edit", "", 1).Keys(appName + '[P500]');
      let check = Sys.Process("explorer").Window("DV2ControlHost", "Start menu", 1).Window("SysListView32", "S", 1);
      while (check.wItem(0,0) == "Recherche...") {
        aqUtils.Delay(500);
        check.Refresh();
      }  
      if (check.wItem(0,0) == 'Aucun élément ne correspond à votre recherche.')
        Log.Message('Application ' + appName + ' not found');

     

    So first i call Windows button.

    After i enter name of the app to find with a short pause ([P500]) that allows the search start.

    After i wait while searching label is displayed.

    After i check if the not found label is displayed.

     

    "Recherche..." and "Aucun élément ne correspond à votre recherche." are language dependant.

     

     

    • ChandanD's avatar
      ChandanD
      Contributor

      Thanks for the solution.

      When I copied your code and tried executing it didn't worked. But I was able to fix the issue.

      I got idea from your code.

       

      Thanks for your support.