The official tutorial for installing sahi https://sahipro.com/docs/using-sahi/quick-tutorial.html is detailed enough and will not be repeated here.
I just installed sahi and found that chrome cannot be detected. So I modified the configuration.
Open sahi and click Configure
The default page shows the type configuration of the browser
First look at how others wrote it, then find chrome, and then imitate and modify it
The following is my modified configuration
<browserType>
<name>chrome</name>
<displayName>Chrome</displayName>
<icon>chrome.png</icon>
<path>$ProgramFiles\Google\Chrome\Application\chrome.exe</path>
<options>--user-data-dir=$userDir\browser\edge\profiles\sahi$threadNo --disable-popup-blocking --proxy-server=127.0.0.1:$port -inprivate </options>
<processName>chrome.exe</processName>
<useSystemProxy>false</useSystemProxy>
<capacity>5</capacity>
</browserType>
Here are a few points:
- The path path is the path to write chrome.exe on your computer
- options is what I copied from other browsers
- userSystemProxy is also a direct copy
I am not too clear about the specific meanings of these, but I can indeed successfully retrieve chrome
Finally, restart sahi