- Используемые версии:
< /ul>Код: Выделить всё
OS: Ubuntu 22.04.4 LTS Google Chrome (for testing) and chromedriver: 124.0 Selenium: 4.22.0 - Когда я открываю браузер без селена, NativeMessaging работает
- Код Java выглядит так:
Код: Выделить всё
ChromeOptions cOpt = new ChromeOptions();
cOpt.setBinary("/path/to/google-chrome-for-testing");
File extension = new File("/path/to/extension.crx");
cOpt.addExtensions(Arrays.asList(extension));
return new ChromeDriver(cOpt);
- Хост-файл Native Messaging находится в ~/.config/google-chrome-for-testing/NativeMessagingHosts
- Имя и идентификатор в файле .json верны
Подробнее здесь: https://stackoverflow.com/questions/790 ... g-selenium