Forum Discussion

ChandanD's avatar
ChandanD
Contributor
4 years ago
Solved

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 n...
  • BenoitB's avatar
    4 years ago

    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.