We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @boris779 . did you try selenoid? I created a POC and the devtools feature works fine! here the code...
version: '3' services: selenoid: network_mode: bridge image: aerokube/selenoid:latest-release volumes: - "./config:/etc/selenoid" - "/var/run/docker.sock:/var/run/docker.sock" - "./video:/opt/selenoid/video" - "./config/logs:/opt/selenoid/logs" #environment: # - OVERRIDE_VIDEO_OUTPUT_DIR=/path/to/config/video command: ["-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs"] ports: - "4444:4444" selenoid-ui: image: "aerokube/selenoid-ui" network_mode: bridge links: - selenoid ports: - "8080:8080" command: ["--selenoid-uri", "http://selenoid:4444"]
and the java code requesting the devtools
private void startDevToolsSerice(WebDriver driver) { ChromeDevToolsService devtools; // Init ChromeDevtools client WebSocketService webSocketService; try { webSocketService = WebSocketServiceImpl.create(new URI( String.format("ws://localhost:4444/devtools/%s/page", ((RemoteWebDriver) driver).getSessionId()))); CommandInvocationHandler commandInvocationHandler = new CommandInvocationHandler(); Map<Method, Object> commandsCache = new ConcurrentHashMap<>(); devtools = ProxyUtils.createProxyFromAbstract(ChromeDevToolsServiceImpl.class, new Class[] { WebSocketService.class, ChromeDevToolsServiceConfiguration.class }, new Object[] { webSocketService, new ChromeDevToolsServiceConfiguration() }, (unused, method, args) -> commandsCache.computeIfAbsent(method, key -> { Class<?> returnType = method.getReturnType(); return ProxyUtils.createProxy(returnType, commandInvocationHandler); })); commandInvocationHandler.setChromeDevToolsService(devtools); System.out.println("started!"); // testPrintNetworkRequests(devtools); testPrintPerformanceRequests(devtools); devtools.close(); System.out.println("Finishes!"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }
I hope it be useful. regards!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi @boris779 . did you try selenoid?
I created a POC and the devtools feature works fine!
here the code...
and the java code requesting the devtools
I hope it be useful. regards!
The text was updated successfully, but these errors were encountered: