Всем привет. Может кто-то сможет помочь? Возникла проблема, переносим проект на selenoid, и после переноса не могу воспользоваться методом executeCdpCommand() у хром_драйвера. Точнее не могу преобразовать RemoteWebDriver в ChromeDriver. На строчке:
((ChromeDriver) driver).executeCdpCommand("Storage.clearCookies", new HashMap<String, Object>(){});
Выдается ошибка:
java.lang.ClassCastException: class org.openqa.selenium.remote.RemoteWebDriver cannot be cast to class org.openqa.selenium.chrome.ChromeDriver (org.openqa.selenium.remote.RemoteWebDriver and org.openqa.selenium.chrome.ChromeDriver are in unnamed module of loader 'app')
Нашел статейку по теме, сделал все как описано, но все равно не помогло, та же ошибка (
https://www.fatalerrors.org/a/selenium-remotewebdriver-uses-cdp-to-modify-user-agent.html)
Версию selenium-java использую 4.0.0-alpha-2