SHAFT is a unified test automation engine for web, mobile, API, CLI, database, and desktop e2e testing. Powered by best-in-class frameworks, SHAFT provides a wizard-like syntax to drive your automation efficiently, maximize your ROI, and minimize your learning curve with no limitations! Stop reinventing the wheel! Upgrade now!
Running on remote server :
java.lang.ClassCastException: class org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$ehToDnr1$ByteBuddy$8RtIVMNI cannot be cast to class org.openqa.selenium.devtools.HasDevTools (org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$ehToDnr1$ByteBuddy$8RtIVMNI is in unnamed module of loader net.bytebuddy.dynamic.loading.ByteArrayClassLoader @33627576; org.openqa.selenium.devtools.HasDevTools is in unnamed module of loader 'app')
Issue is fixed by adding --remote-debugging-port=9222 to chrome options chromeOptions.addArguments("--remote-debugging-port=9222");
getDevTools()
using latest SHAFT version 8.4.20241001-beta and chrome verison 129.0.6668.90WebDriver augmentedDriver = (new Augmenter()).augment(driver.get().getDriver());
DevTools devTools = ((HasDevTools) augmentedDriver).getDevTools();
// Issue is hereRunning locally gives this exception:
org.openqa.selenium.devtools.DevToolsException: Unable to create DevTools connection Build info: version: '4.25.0', revision: '8a8aea2337' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '21.0.2' Driver info: DevTools Connection
Running on remote server :
java.lang.ClassCastException: class org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$ehToDnr1$ByteBuddy$8RtIVMNI cannot be cast to class org.openqa.selenium.devtools.HasDevTools (org.openqa.selenium.remote.RemoteWebDriver$ByteBuddy$ehToDnr1$ByteBuddy$8RtIVMNI is in unnamed module of loader net.bytebuddy.dynamic.loading.ByteArrayClassLoader @33627576; org.openqa.selenium.devtools.HasDevTools is in unnamed module of loader 'app')
Issue is fixed by adding --remote-debugging-port=9222 to chrome options
chromeOptions.addArguments("--remote-debugging-port=9222");