@@ -23,12 +23,10 @@ import java.util.logging.*
2323 * @see org.openqa.selenium.devtools.CdpEndpointFinder
2424 * @see org.openqa.selenium.devtools.Connection
2525 * @see org.openqa.selenium.devtools.idealized.Network
26- * @see org.openqa.selenium.remote.ErrorCodes
2726 * @see org.openqa.selenium.remote.ProtocolHandshake
2827 * @see org.openqa.selenium.remote.RemoteLogs
2928 * @see org.openqa.selenium.remote.RemoteWebDriver
3029 * @see org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec
31- * @see org.openqa.selenium.remote.http.netty.NettyWebSocket
3230 * @see org.openqa.selenium.net.UrlChecker
3331 * @see org.openqa.selenium.json.JsonOutput
3432 * @see org.openqa.selenium.os.OsProcess
@@ -44,26 +42,14 @@ internal fun DriverService.getProcess(): Process? {
4442 /* *
4543 * @see org.openqa.selenium.remote.service.DriverService.process
4644 */
47- val commandline = DriverService ::class .java.getDeclaredField(" process" )
45+ val external = DriverService ::class .java.getDeclaredField(" process" )
4846 .apply { isAccessible = true }.get(this ) ? : return null
4947
5048 /* *
51- * @see org.openqa.selenium.os.CommandLine .process
49+ * @see org.openqa.selenium.os.ExternalProcess .process
5250 */
53- val osProcess = commandline::class .java.getDeclaredField(" process" )
54- .apply { isAccessible = true }.get(commandline) ? : return null
55-
56- /* *
57- * @see org.openqa.selenium.os.OsProcess.executeWatchdog
58- */
59- val watchdog = osProcess::class .java.getDeclaredField(" executeWatchdog" )
60- .apply { isAccessible = true }.get(osProcess) ? : return null
61-
62- /* *
63- * @see org.openqa.selenium.os.OsProcess.SeleniumWatchDog.process
64- */
65- return watchdog::class .java.getDeclaredField(" process" )
66- .apply { isAccessible = true }.get(watchdog) as ? Process
51+ return external::class .java.getDeclaredField(" process" )
52+ .apply { isAccessible = true }.get(external) as ? Process
6753}
6854
6955internal fun RemoteWebDriver.getHttpClientFactory (): HttpClient .Factory ? {
0 commit comments