Sahi Documentation

Issues in Microsoft Edge versions 44.19041 and below

info NOTE FOR MICROSOFT EDGE : Older versions of Microsoft Edge i.e versions 44.19041 and below have few limitations when automating with Sahi Pro. So it is recommended to use Microsoft Edge versions 79.0.309 and above.
info NOTE FOR MICROSOFT EDGE VERSIONS 44.19041 AND BELOW : Parallel execution is not supported for such older Microsoft Edge versions. Also you need to close any running instance of Microsoft Edge before playback for these old Microsoft Edge versions.
If you want to perform any automation with Microsoft Edge versions 44.19041 and below then don't make Microsoft Edge as your system's default browser.

Sahi Pro console Edge 'PIDs not available'

symptom When launching Edge browser from the dashboard, we get an error in Sahi Pro console stating PIDs not available yet. Waiting for 1 sec
and consequently, proxy gets reverted.

info To observe this issue
  1. Open task manager and go to details tab. Then launch Edge browser window (with or without Sahi Pro), it will start a new process 'MicrosoftEdge.exe' with process id lets say '1234'.
  2. Now close the browser window. This will end the process with id '1234'. However on closing, Edge will launch another process 'MicrosoftEdge.exe' with id lets say '5678'. This process will be in suspended state.
  3. So when we launch Edge browser again for the second time, a new process will not be started but the process 'MicrosoftEdge.exe' with id '5678' will be resumed.
  4. Sahi Pro collects the process IDs which were created after we launch the browser. Since in this case, no new process is created Sahi will assume that the browser was not launched. Thus Sahi will revert the proxy.
cause
    • This is due to an update in Microsoft Edge. With this feature, Microsoft Edge will be pre-launched each time it is closed.
      This feature has been introduced since Windows 10 build 17713.
resolution This feature of Microsoft Edge needs to be disabled to fix this issue.

There are two ways to do it.

  1. For Windows 10 Pro and Enterprise editions :
    1. Open Local Group Policy Editor.
      1. Start by clicking on the Windows start bar (bottom-left corner) or press the Windows key.
      2. Then, type Local Group Policy to make use of the search function. Next, click on Edit group policy.
    2. In the left pane of Local Group Policy Editor, navigate to the location Computer Configuration\Administrative Templates\Windows Components\Microsoft Edge.
    3. In the right pane of Microsoft Edge in Local Group Policy Editor, double click on the Allow Microsoft Edge to pre-launch at Windows startup, when the system is idle, and each time Microsoft Edge is closed policy to edit it.
    4. Select radio button for Enabled, and configure pre-launch setting by selecting dropdown value Prevent pre-launching . Click on 'OK' button.
    5. Restart your system.
  2. For Windows 10 Home or other Windows 10 editions which do not have local group policy editor:
    1. Launch Registry Editor.
      1. Start by clicking on the Windows start bar (bottom-left corner) or press the Windows key.
      2. Then, type Registry Editor to make use of the search function. Next, click on Registry Editor.
    2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main. If such a key does not exist, it needs to be created.
    3. Right click on Main and select New > Dword (32-bit) Value. Name it AllowPrelaunch and ensure the value is set to 0 (it is the default value).
    4. Restart your system.