How to use CdpEndpointFinder class of org.openqa.selenium.devtools package

Best Selenium code snippet using org.openqa.selenium.devtools.CdpEndpointFinder

Source:FirefoxDriver.java Github

copy

Full Screen

...24import org.openqa.selenium.OutputType;25import org.openqa.selenium.PersistentCapabilities;26import org.openqa.selenium.Proxy;27import org.openqa.selenium.WebDriverException;28import org.openqa.selenium.devtools.CdpEndpointFinder;29import org.openqa.selenium.devtools.CdpInfo;30import org.openqa.selenium.devtools.CdpVersionFinder;31import org.openqa.selenium.devtools.Connection;32import org.openqa.selenium.devtools.DevTools;33import org.openqa.selenium.devtools.DevToolsException;34import org.openqa.selenium.devtools.HasDevTools;35import org.openqa.selenium.devtools.noop.NoOpCdpInfo;36import org.openqa.selenium.html5.LocalStorage;37import org.openqa.selenium.html5.SessionStorage;38import org.openqa.selenium.html5.WebStorage;39import org.openqa.selenium.internal.Require;40import org.openqa.selenium.remote.CommandInfo;41import org.openqa.selenium.remote.FileDetector;42import org.openqa.selenium.remote.RemoteWebDriver;43import org.openqa.selenium.remote.RemoteWebDriverBuilder;44import org.openqa.selenium.remote.html5.RemoteWebStorage;45import org.openqa.selenium.remote.http.ClientConfig;46import org.openqa.selenium.remote.http.HttpClient;47import org.openqa.selenium.remote.service.DriverCommandExecutor;48import org.openqa.selenium.remote.service.DriverService;49import java.net.URI;50import java.nio.file.Path;51import java.util.Map;52import java.util.Optional;53/**54 * An implementation of the {#link WebDriver} interface that drives Firefox.55 * <p>56 * The best way to construct a {@code FirefoxDriver} with various options is to make use of the57 * {@link FirefoxOptions}, like so:58 *59 * <pre>60 * FirefoxOptions options = new FirefoxOptions()61 * .addPreference("browser.startup.page", 1)62 * .addPreference("browser.startup.homepage", "https://www.google.co.uk")63 * .setAcceptInsecureCerts(true)64 * .setHeadless(true);65 * WebDriver driver = new FirefoxDriver(options);66 * </pre>67 */68public class FirefoxDriver extends RemoteWebDriver69 implements WebStorage, HasExtensions, HasFullPageScreenshot, HasContext, HasDevTools {70 private final Capabilities capabilities;71 private final RemoteWebStorage webStorage;72 private final HasExtensions extensions;73 private final HasFullPageScreenshot fullPageScreenshot;74 private final HasContext context;75 private final Optional<URI> cdpUri;76 protected FirefoxBinary binary;77 private DevTools devTools;78 public FirefoxDriver() {79 this(new FirefoxOptions());80 }81 /**82 * @deprecated Use {@link #FirefoxDriver(FirefoxOptions)}.83 */84 @Deprecated85 public FirefoxDriver(Capabilities desiredCapabilities) {86 this(new FirefoxOptions(Require.nonNull("Capabilities", desiredCapabilities)));87 }88 /**89 * @deprecated Use {@link #FirefoxDriver(FirefoxDriverService, FirefoxOptions)}.90 */91 @Deprecated92 public FirefoxDriver(FirefoxDriverService service, Capabilities desiredCapabilities) {93 this(94 Require.nonNull("Driver service", service),95 new FirefoxOptions(desiredCapabilities));96 }97 public FirefoxDriver(FirefoxOptions options) {98 this(new FirefoxDriverCommandExecutor(GeckoDriverService.createDefaultService()), options);99 }100 public FirefoxDriver(FirefoxDriverService service) {101 this(service, new FirefoxOptions());102 }103 public FirefoxDriver(FirefoxDriverService service, FirefoxOptions options) {104 this(new FirefoxDriverCommandExecutor(service), options);105 }106 private FirefoxDriver(FirefoxDriverCommandExecutor executor, FirefoxOptions options) {107 super(executor, checkCapabilitiesAndProxy(options));108 webStorage = new RemoteWebStorage(getExecuteMethod());109 extensions = new AddHasExtensions().getImplementation(getCapabilities(), getExecuteMethod());110 fullPageScreenshot = new AddHasFullPageScreenshot().getImplementation(getCapabilities(), getExecuteMethod());111 context = new AddHasContext().getImplementation(getCapabilities(), getExecuteMethod());112 Capabilities capabilities = super.getCapabilities();113 HttpClient.Factory clientFactory = HttpClient.Factory.createDefault();114 Optional<URI> cdpUri = CdpEndpointFinder.getReportedUri("moz:debuggerAddress", capabilities)115 .flatMap(reported -> CdpEndpointFinder.getCdpEndPoint(clientFactory, reported));116 this.cdpUri = cdpUri;117 this.capabilities = cdpUri.map(uri ->118 new ImmutableCapabilities(119 new PersistentCapabilities(capabilities)120 .setCapability("se:cdp", uri.toString())121 .setCapability("se:cdpVersion", "85.0")))122 .orElse(new ImmutableCapabilities(capabilities));123 }124 @Beta125 public static RemoteWebDriverBuilder builder() {126 return RemoteWebDriver.builder().oneOf(new FirefoxOptions());127 }128 /**129 * Check capabilities and proxy if it is set...

Full Screen

Full Screen

Source:DriverServiceSessionFactory.java Github

copy

Full Screen

...20import org.openqa.selenium.PersistentCapabilities;21import org.openqa.selenium.Platform;22import org.openqa.selenium.SessionNotCreatedException;23import org.openqa.selenium.WebDriverException;24import org.openqa.selenium.devtools.CdpEndpointFinder;25import org.openqa.selenium.grid.data.CreateSessionRequest;26import org.openqa.selenium.grid.node.ActiveSession;27import org.openqa.selenium.grid.node.ProtocolConvertingSession;28import org.openqa.selenium.grid.node.SessionFactory;29import org.openqa.selenium.internal.Either;30import org.openqa.selenium.internal.Require;31import org.openqa.selenium.remote.Command;32import org.openqa.selenium.remote.Dialect;33import org.openqa.selenium.remote.DriverCommand;34import org.openqa.selenium.remote.ProtocolHandshake;35import org.openqa.selenium.remote.Response;36import org.openqa.selenium.remote.SessionId;37import org.openqa.selenium.remote.http.HttpClient;38import org.openqa.selenium.remote.service.DriverService;39import org.openqa.selenium.remote.tracing.AttributeKey;40import org.openqa.selenium.remote.tracing.EventAttribute;41import org.openqa.selenium.remote.tracing.EventAttributeValue;42import org.openqa.selenium.remote.tracing.Span;43import org.openqa.selenium.remote.tracing.Status;44import org.openqa.selenium.remote.tracing.Tracer;45import java.net.URI;46import java.net.URL;47import java.time.Instant;48import java.util.HashMap;49import java.util.Map;50import java.util.Optional;51import java.util.Set;52import java.util.function.Function;53import java.util.function.Predicate;54import java.util.stream.Stream;55import static org.openqa.selenium.remote.RemoteTags.CAPABILITIES;56import static org.openqa.selenium.remote.RemoteTags.CAPABILITIES_EVENT;57import static org.openqa.selenium.remote.tracing.Tags.EXCEPTION;58public class DriverServiceSessionFactory implements SessionFactory {59 private final Tracer tracer;60 private final HttpClient.Factory clientFactory;61 private final Predicate<Capabilities> predicate;62 private final DriverService.Builder<?, ?> builder;63 private final Capabilities stereotype;64 private final BrowserOptionsMutator browserOptionsMutator;65 public DriverServiceSessionFactory(66 Tracer tracer,67 HttpClient.Factory clientFactory,68 Capabilities stereotype,69 Predicate<Capabilities> predicate,70 DriverService.Builder<?, ?> builder) {71 this.tracer = Require.nonNull("Tracer", tracer);72 this.clientFactory = Require.nonNull("HTTP client factory", clientFactory);73 this.stereotype = ImmutableCapabilities.copyOf(Require.nonNull("Stereotype", stereotype));74 this.predicate = Require.nonNull("Accepted capabilities predicate", predicate);75 this.builder = Require.nonNull("Driver service builder", builder);76 this.browserOptionsMutator = new BrowserOptionsMutator(this.stereotype);77 }78 @Override79 public boolean test(Capabilities capabilities) {80 return predicate.test(capabilities);81 }82 @Override83 public Either<WebDriverException, ActiveSession> apply(CreateSessionRequest sessionRequest) {84 if (sessionRequest.getDownstreamDialects().isEmpty()) {85 return Either.left(new SessionNotCreatedException("No downstream dialects were found."));86 }87 if (!test(sessionRequest.getDesiredCapabilities())) {88 return Either.left(new SessionNotCreatedException("New session request capabilities do not "89 + "match the stereotype."));90 }91 try (Span span = tracer.getCurrentContext().createSpan("driver_service_factory.apply")) {92 Capabilities capabilities = browserOptionsMutator.apply(sessionRequest.getDesiredCapabilities());93 Optional<Platform> platformName = Optional.ofNullable(capabilities.getPlatformName());94 if (platformName.isPresent()) {95 capabilities = generalizePlatform(capabilities);96 }97 Map<String, EventAttributeValue> attributeMap = new HashMap<>();98 CAPABILITIES.accept(span, capabilities);99 CAPABILITIES_EVENT.accept(attributeMap, capabilities);100 attributeMap.put(AttributeKey.LOGGER_CLASS.getKey(),101 EventAttribute.setValue(this.getClass().getName()));102 DriverService service = builder.build();103 try {104 service.start();105 URL serviceURL = service.getUrl();106 attributeMap.put(AttributeKey.DRIVER_URL.getKey(),107 EventAttribute.setValue(serviceURL.toString()));108 HttpClient client = clientFactory.createClient(serviceURL);109 Command command = new Command(null, DriverCommand.NEW_SESSION(capabilities));110 ProtocolHandshake.Result result = new ProtocolHandshake().createSession(client, command);111 Set<Dialect> downstreamDialects = sessionRequest.getDownstreamDialects();112 Dialect upstream = result.getDialect();113 Dialect downstream = downstreamDialects.contains(result.getDialect()) ?114 result.getDialect() :115 downstreamDialects.iterator().next();116 Response response = result.createResponse();117 attributeMap.put(AttributeKey.UPSTREAM_DIALECT.getKey(),118 EventAttribute.setValue(upstream.toString()));119 attributeMap.put(AttributeKey.DOWNSTREAM_DIALECT.getKey(),120 EventAttribute.setValue(downstream.toString()));121 attributeMap.put(AttributeKey.DRIVER_RESPONSE.getKey(),122 EventAttribute.setValue(response.toString()));123 // TODO: This is a nasty hack. Try and make it elegant.124 Capabilities caps = new ImmutableCapabilities((Map<?, ?>) response.getValue());125 if (platformName.isPresent()) {126 caps = setInitialPlatform(caps, platformName.get());127 }128 caps = readDevToolsEndpointAndVersion(caps);129 span.addEvent("Driver service created session", attributeMap);130 return Either.right(131 new ProtocolConvertingSession(132 tracer,133 client,134 new SessionId(response.getSessionId()),135 service.getUrl(),136 downstream,137 upstream,138 stereotype,139 caps,140 Instant.now()) {141 @Override142 public void stop() {143 service.stop();144 client.close();145 }146 });147 } catch (Exception e) {148 span.setAttribute("error", true);149 span.setStatus(Status.CANCELLED);150 EXCEPTION.accept(attributeMap, e);151 String errorMessage = "Error while creating session with the driver service. "152 + "Stopping driver service: " + e.getMessage();153 attributeMap.put(AttributeKey.EXCEPTION_MESSAGE.getKey(),154 EventAttribute.setValue(errorMessage));155 span.addEvent(AttributeKey.EXCEPTION_EVENT.getKey(), attributeMap);156 service.stop();157 return Either.left(new SessionNotCreatedException(errorMessage));158 }159 } catch (Exception e) {160 return Either.left(new SessionNotCreatedException(e.getMessage()));161 }162 }163 private Capabilities readDevToolsEndpointAndVersion(Capabilities caps) {164 class DevToolsInfo {165 public final URI cdpEndpoint;166 public final String version;167 public DevToolsInfo(URI cdpEndpoint, String version) {168 this.cdpEndpoint = cdpEndpoint;169 this.version = version;170 }171 }172 Function<Capabilities, Optional<DevToolsInfo>> chrome = c ->173 CdpEndpointFinder.getReportedUri("goog:chromeOptions", c)174 .map(uri -> new DevToolsInfo(uri, c.getBrowserVersion()));175 Function<Capabilities, Optional<DevToolsInfo>> edge = c ->176 CdpEndpointFinder.getReportedUri("ms:edgeOptions", c)177 .map(uri -> new DevToolsInfo(uri, c.getBrowserVersion()));178 Function<Capabilities, Optional<DevToolsInfo>> firefox = c ->179 CdpEndpointFinder.getReportedUri("moz:debuggerAddress", c)180 .map(uri -> new DevToolsInfo(uri, "85"));181 Optional<DevToolsInfo> maybeInfo = Stream.of(chrome, edge, firefox)182 .map(finder -> finder.apply(caps))183 .filter(Optional::isPresent)184 .map(Optional::get)185 .findFirst();186 if (maybeInfo.isPresent()) {187 DevToolsInfo info = maybeInfo.get();188 return new PersistentCapabilities(caps)189 .setCapability("se:cdp", info.cdpEndpoint)190 .setCapability("se:cdpVersion", info.version);191 }192 return caps;193 }...

Full Screen

Full Screen

Source:ChromiumDriver.java Github

copy

Full Screen

...23import org.openqa.selenium.ImmutableCapabilities;24import org.openqa.selenium.PersistentCapabilities;25import org.openqa.selenium.WebDriver;26import org.openqa.selenium.WebDriverException;27import org.openqa.selenium.devtools.CdpEndpointFinder;28import org.openqa.selenium.devtools.CdpInfo;29import org.openqa.selenium.devtools.CdpVersionFinder;30import org.openqa.selenium.devtools.Connection;31import org.openqa.selenium.devtools.DevTools;32import org.openqa.selenium.devtools.HasDevTools;33import org.openqa.selenium.devtools.noop.NoOpCdpInfo;34import org.openqa.selenium.html5.LocalStorage;35import org.openqa.selenium.html5.Location;36import org.openqa.selenium.html5.LocationContext;37import org.openqa.selenium.html5.SessionStorage;38import org.openqa.selenium.html5.WebStorage;39import org.openqa.selenium.interactions.HasTouchScreen;40import org.openqa.selenium.interactions.TouchScreen;41import org.openqa.selenium.internal.Require;42import org.openqa.selenium.logging.EventType;43import org.openqa.selenium.logging.HasLogEvents;44import org.openqa.selenium.mobile.NetworkConnection;45import org.openqa.selenium.remote.CommandExecutor;46import org.openqa.selenium.remote.FileDetector;47import org.openqa.selenium.remote.RemoteTouchScreen;48import org.openqa.selenium.remote.RemoteWebDriver;49import org.openqa.selenium.remote.html5.RemoteLocationContext;50import org.openqa.selenium.remote.html5.RemoteWebStorage;51import org.openqa.selenium.remote.http.ClientConfig;52import org.openqa.selenium.remote.http.HttpClient;53import org.openqa.selenium.remote.mobile.RemoteNetworkConnection;54import java.net.URI;55import java.util.Map;56import java.util.Optional;57import java.util.function.Predicate;58import java.util.function.Supplier;59import java.util.logging.Logger;60/**61 * A {@link WebDriver} implementation that controls a Chromium browser running on the local machine.62 * It is used as the base class for Chromium-based browser drivers (Chrome, Edgium).63 */64public class ChromiumDriver extends RemoteWebDriver implements65 HasAuthentication,66 HasDevTools,67 HasLogEvents,68 HasTouchScreen,69 LocationContext,70 NetworkConnection,71 WebStorage {72 private static final Logger LOG = Logger.getLogger(ChromiumDriver.class.getName());73 private final Capabilities capabilities;74 private final RemoteLocationContext locationContext;75 private final RemoteWebStorage webStorage;76 private final TouchScreen touchScreen;77 private final RemoteNetworkConnection networkConnection;78 private final Optional<Connection> connection;79 private final Optional<DevTools> devTools;80 protected ChromiumDriver(CommandExecutor commandExecutor, Capabilities capabilities, String capabilityKey) {81 super(commandExecutor, capabilities);82 locationContext = new RemoteLocationContext(getExecuteMethod());83 webStorage = new RemoteWebStorage(getExecuteMethod());84 touchScreen = new RemoteTouchScreen(getExecuteMethod());85 networkConnection = new RemoteNetworkConnection(getExecuteMethod());86 HttpClient.Factory factory = HttpClient.Factory.createDefault();87 Capabilities originalCapabilities = super.getCapabilities();88 Optional<URI> cdpUri = CdpEndpointFinder.getReportedUri(capabilityKey, originalCapabilities)89 .flatMap(uri -> CdpEndpointFinder.getCdpEndPoint(factory, uri));90 connection = cdpUri.map(uri -> new Connection(91 factory.createClient(ClientConfig.defaultConfig().baseUri(uri)),92 uri.toString()));93 CdpInfo cdpInfo = new CdpVersionFinder().match(originalCapabilities.getBrowserVersion())94 .orElseGet(() -> {95 LOG.warning(96 String.format(97 "Unable to find version of CDP to use for %s. You may need to " +98 "include a dependency on a specific version of the CDP using " +99 "something similar to " +100 "`org.seleniumhq.selenium:selenium-devtools-v86:%s` where the " +101 "version (\"v86\") matches the version of the chromium-based browser " +102 "you're using and the version number of the artifact is the same " +103 "as Selenium's.",...

Full Screen

Full Screen

Source:ProxyNodeWebsockets.java Github

copy

Full Screen

...18import static org.openqa.selenium.internal.Debug.getDebugLogLevel;19import static org.openqa.selenium.remote.http.HttpMethod.GET;20import com.google.common.collect.ImmutableSet;21import org.openqa.selenium.Capabilities;22import org.openqa.selenium.devtools.CdpEndpointFinder;23import org.openqa.selenium.grid.data.Session;24import org.openqa.selenium.remote.SessionId;25import org.openqa.selenium.remote.http.BinaryMessage;26import org.openqa.selenium.remote.http.ClientConfig;27import org.openqa.selenium.remote.http.CloseMessage;28import org.openqa.selenium.remote.http.HttpClient;29import org.openqa.selenium.remote.http.HttpRequest;30import org.openqa.selenium.remote.http.Message;31import org.openqa.selenium.remote.http.TextMessage;32import org.openqa.selenium.remote.http.UrlTemplate;33import org.openqa.selenium.remote.http.WebSocket;34import java.net.URI;35import java.net.URISyntaxException;36import java.util.Objects;37import java.util.Optional;38import java.util.function.BiFunction;39import java.util.function.Consumer;40import java.util.logging.Level;41import java.util.logging.Logger;42import java.util.stream.Stream;43public class ProxyNodeWebsockets implements BiFunction<String, Consumer<Message>,44 Optional<Consumer<Message>>> {45 private static final UrlTemplate CDP_TEMPLATE = new UrlTemplate("/session/{sessionId}/se/cdp");46 private static final UrlTemplate FWD_TEMPLATE = new UrlTemplate("/session/{sessionId}/se/fwd");47 private static final UrlTemplate VNC_TEMPLATE = new UrlTemplate("/session/{sessionId}/se/vnc");48 private static final Logger LOG = Logger.getLogger(ProxyNodeWebsockets.class.getName());49 private static final ImmutableSet<String> CDP_ENDPOINT_CAPS =50 ImmutableSet.of("goog:chromeOptions",51 "moz:debuggerAddress",52 "ms:edgeOptions");53 private final HttpClient.Factory clientFactory;54 private final Node node;55 public ProxyNodeWebsockets(HttpClient.Factory clientFactory, Node node) {56 this.clientFactory = Objects.requireNonNull(clientFactory);57 this.node = Objects.requireNonNull(node);58 }59 @Override60 public Optional<Consumer<Message>> apply(String uri, Consumer<Message> downstream) {61 UrlTemplate.Match fwdMatch = FWD_TEMPLATE.match(uri);62 UrlTemplate.Match cdpMatch = CDP_TEMPLATE.match(uri);63 UrlTemplate.Match vncMatch = VNC_TEMPLATE.match(uri);64 if (cdpMatch == null && vncMatch == null && fwdMatch == null) {65 return Optional.empty();66 }67 String sessionId = Stream.of(fwdMatch, cdpMatch, vncMatch)68 .filter(Objects::nonNull)69 .findFirst()70 .get()71 .getParameters()72 .get("sessionId");73 LOG.fine("Matching websockets for session id: " + sessionId);74 SessionId id = new SessionId(sessionId);75 if (!node.isSessionOwner(id)) {76 LOG.info("Not owner of " + id);77 return Optional.empty();78 }79 Session session = node.getSession(id);80 Capabilities caps = session.getCapabilities();81 LOG.fine("Scanning for endpoint: " + caps);82 if (vncMatch != null) {83 return findVncEndpoint(downstream, caps);84 }85 // This match happens when a user wants to do CDP over Dynamic Grid86 if (fwdMatch != null) {87 LOG.info("Matched endpoint where CDP connection is being forwarded");88 return findCdpEndpoint(downstream, caps);89 }90 if (caps.getCapabilityNames().contains("se:forwardCdp")) {91 LOG.info("Found endpoint where CDP connection needs to be forwarded");92 return findForwardCdpEndpoint(downstream, caps);93 }94 return findCdpEndpoint(downstream, caps);95 }96 private Optional<Consumer<Message>> findCdpEndpoint(Consumer<Message> downstream,97 Capabilities caps) {98 // Using strings here to avoid Node depending upon specific drivers.99 for (String cdpEndpointCap : CDP_ENDPOINT_CAPS) {100 Optional<URI> cdpUri = CdpEndpointFinder.getReportedUri(cdpEndpointCap, caps)101 .flatMap(reported -> CdpEndpointFinder.getCdpEndPoint(clientFactory, reported));102 if (cdpUri.isPresent()) {103 LOG.log(getDebugLogLevel(), String.format("Endpoint found in %s", cdpEndpointCap));104 return cdpUri.map(cdp -> createWsEndPoint(cdp, downstream));105 }106 }107 return Optional.empty();108 }109 private Optional<Consumer<Message>> findForwardCdpEndpoint(Consumer<Message> downstream,110 Capabilities caps) {111 // When using Dynamic Grid, we need to connect to a container before using the debuggerAddress112 try {113 URI uri = new URI(String.valueOf(caps.getCapability("se:forwardCdp")));114 return Optional.of(uri).map(cdp -> createWsEndPoint(cdp, downstream));115 } catch (URISyntaxException e) {...

Full Screen

Full Screen

Source:ProxyNodeCdp.java Github

copy

Full Screen

...15// specific language governing permissions and limitations16// under the License.17package org.openqa.selenium.grid.node;18import org.openqa.selenium.Capabilities;19import org.openqa.selenium.devtools.CdpEndpointFinder;20import org.openqa.selenium.grid.data.Session;21import org.openqa.selenium.remote.SessionId;22import org.openqa.selenium.remote.http.BinaryMessage;23import org.openqa.selenium.remote.http.ClientConfig;24import org.openqa.selenium.remote.http.CloseMessage;25import org.openqa.selenium.remote.http.HttpClient;26import org.openqa.selenium.remote.http.HttpRequest;27import org.openqa.selenium.remote.http.Message;28import org.openqa.selenium.remote.http.TextMessage;29import org.openqa.selenium.remote.http.UrlTemplate;30import org.openqa.selenium.remote.http.WebSocket;31import java.net.URI;32import java.util.Objects;33import java.util.Optional;34import java.util.function.BiFunction;35import java.util.function.Consumer;36import java.util.logging.Level;37import java.util.logging.Logger;38import static org.openqa.selenium.internal.Debug.getDebugLogLevel;39import static org.openqa.selenium.remote.http.HttpMethod.GET;40public class ProxyNodeCdp implements BiFunction<String, Consumer<Message>, Optional<Consumer<Message>>> {41 private static final UrlTemplate CDP_TEMPLATE = new UrlTemplate("/session/{sessionId}/se/cdp");42 private static final Logger LOG = Logger.getLogger(ProxyNodeCdp.class.getName());43 private final HttpClient.Factory clientFactory;44 private final Node node;45 public ProxyNodeCdp(HttpClient.Factory clientFactory, Node node) {46 this.clientFactory = Objects.requireNonNull(clientFactory);47 this.node = Objects.requireNonNull(node);48 }49 @Override50 public Optional<Consumer<Message>> apply(String uri, Consumer<Message> downstream) {51 UrlTemplate.Match match = CDP_TEMPLATE.match(uri);52 if (match == null) {53 return Optional.empty();54 }55 LOG.fine("Matching CDP session for " + match.getParameters().get("sessionId"));56 SessionId id = new SessionId(match.getParameters().get("sessionId"));57 if (!node.isSessionOwner(id)) {58 LOG.info("Not owner of " + id);59 return Optional.empty();60 }61 Session session = node.getSession(id);62 Capabilities caps = session.getCapabilities();63 LOG.fine("Scanning for CDP endpoint: " + caps);64 // Using strings here to avoid Node depending upon specific drivers.65 Optional<URI> cdpUri = CdpEndpointFinder.getReportedUri("goog:chromeOptions", caps)66 .flatMap(reported -> CdpEndpointFinder.getCdpEndPoint(clientFactory, reported));67 if (cdpUri.isPresent()) {68 LOG.log(getDebugLogLevel(), "Chrome endpoint found");69 return cdpUri.map(cdp -> createCdpEndPoint(cdp, downstream));70 }71 cdpUri = CdpEndpointFinder.getReportedUri("moz:debuggerAddress", caps)72 .flatMap(reported -> CdpEndpointFinder.getCdpEndPoint(clientFactory, reported));73 if (cdpUri.isPresent()) {74 LOG.log(getDebugLogLevel(), "Firefox endpoint found");75 return cdpUri.map(cdp -> createCdpEndPoint(cdp, downstream));76 }77 LOG.fine("Searching for edge options");78 cdpUri = CdpEndpointFinder.getReportedUri("ms:edgeOptions", caps)79 .flatMap(reported -> CdpEndpointFinder.getCdpEndPoint(clientFactory, reported));80 if (cdpUri.isPresent()) {81 LOG.log(getDebugLogLevel(), "Edge endpoint found");82 }83 return cdpUri.map(cdp -> createCdpEndPoint(cdp, downstream));84 }85 private Consumer<Message> createCdpEndPoint(URI uri, Consumer<Message> downstream) {86 Objects.requireNonNull(uri);87 LOG.info("Establishing CDP connection to " + uri);88 HttpClient client = clientFactory.createClient(ClientConfig.defaultConfig().baseUri(uri));89 WebSocket upstream = client.openSocket(new HttpRequest(GET, uri.toString()), new ForwardingListener(downstream));90 return upstream::send;91 }92 private static class ForwardingListener implements WebSocket.Listener {93 private final Consumer<Message> downstream;...

Full Screen

Full Screen

Source:ChromiumDevToolsLocator.java Github

copy

Full Screen

...24import java.util.Map;25import java.util.Optional;26import java.util.logging.Level;27import java.util.logging.Logger;28import static org.openqa.selenium.devtools.CdpEndpointFinder.getCdpEndPoint;29public class ChromiumDevToolsLocator {30 private static final Logger LOG = Logger.getLogger(ChromiumDevToolsLocator.class.getName());31 public static Optional<URI> getReportedUri(String capabilityKey, Capabilities caps) {32 Object raw = caps.getCapability(capabilityKey);33 if (!(raw instanceof Map)) {34 LOG.fine("No capabilities for " + capabilityKey);35 return Optional.empty();36 }37 raw = ((Map<?, ?>) raw).get("debuggerAddress");38 if (!(raw instanceof String)) {39 LOG.fine("No debugger address");40 return Optional.empty();41 }42 int index = ((String) raw).lastIndexOf(':');...

Full Screen

Full Screen

Source:CdpEndpointFinder.java Github

copy

Full Screen

...29import static java.net.HttpURLConnection.HTTP_OK;30import static org.openqa.selenium.json.Json.MAP_TYPE;31import static org.openqa.selenium.remote.http.Contents.string;32import static org.openqa.selenium.remote.http.HttpMethod.GET;33public class CdpEndpointFinder {34 private static final Logger LOG = Logger.getLogger(CdpEndpointFinder.class.getName());35 private static final Json JSON = new Json();36 public static Optional<URI> getCdpEndPoint(HttpClient.Factory clientFactory, URI reportedUri) {37 Require.nonNull("HTTP client factory", clientFactory);38 Require.nonNull("DevTools URI", reportedUri);39 ClientConfig config = ClientConfig.defaultConfig().baseUri(reportedUri);40 HttpClient client = clientFactory.createClient(config);41 HttpResponse res = client.execute(new HttpRequest(GET, "/json/version"));42 if (res.getStatus() != HTTP_OK) {43 return Optional.empty();44 }45 Map<String, Object> versionData = JSON.toType(string(res), MAP_TYPE);46 Object raw = versionData.get("webSocketDebuggerUrl");47 if (!(raw instanceof String)) {48 return Optional.empty();...

Full Screen

Full Screen

Source:CdpEndpointFinderTest.java Github

copy

Full Screen

...24import java.net.URI;25import java.util.Optional;26import static org.assertj.core.api.Assertions.assertThat;27@Category(UnitTests.class)28public class CdpEndpointFinderTest {29 @Test30 public void shouldReturnEmptyIfNoDebuggerAddressIsGiven() {31 Optional<URI> uri = CdpEndpointFinder32 .getReportedUri("foo:options", new ImmutableCapabilities());33 assertThat(uri).isEmpty();34 }35 @Test36 public void shouldReturnUriIfPresent() {37 Capabilities caps = new Json()38 .toType(39 "{\"ms:edgeOptions\": { \"debuggerAddress\": \"localhost:55498\" }}",40 Capabilities.class);41 Optional<URI> uri = CdpEndpointFinder.getReportedUri("ms:edgeOptions", caps);42 assertThat(uri.get()).isEqualTo(URI.create("http://localhost:55498"));43 }44 @Test45 public void shouldReturnUriIfPresentAndIsAtTopLevel() {46 Capabilities caps = new Json().toType(47 "{\"moz:debuggerAddress\": \"localhost:93487\" }",48 Capabilities.class);49 Optional<URI> uri = CdpEndpointFinder.getReportedUri("moz:debuggerAddress", caps);50 assertThat(uri.get()).isEqualTo(URI.create("http://localhost:93487"));51 }52}...

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.devtools.CdpEndpointFinder;2import org.openqa.selenium.devtools.DevTools;3import org.openqa.selenium.devtools.v85.security.Security;4import org.openqa.selenium.devtools.v85.security.model.CertificateErrorAction;5import org.openqa.selenium.devtools.v85.security.model.CertificateErrorEvent;6import org.openqa.selenium.devtools.v85.security.model.CertificateErrorEventResponse;7import org.openqa.selenium.devtools.v85.security.model.CertificateErrorReason;8import org.openqa.selenium.devtools.v85.security.model.CertificateSecurityState;9import org.openqa.selenium.devtools.v85.security.model.SecurityStateChangedEvent;10import org.openqa.selenium.devtools.v85.security.model.SecurityStateChangedEventResponse;11import org.openqa.selenium.devtools.v85.security.model.SecurityStateExplanation;12import org.openqa.selenium.devtools.v85.security.model.SecurityStateExplanationDetails;13import org.openqa.selenium.devtools.v85.security.model.SecurityStateExplanationSummary;14import org.openqa.selenium.devtools.v85.security.model.SecurityStateExplanationSummarySummary;15import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueDetails;16import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueId;17import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueSeverity;18import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueType;19import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetails;20import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificate;21import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateType;22import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateTypeCertificateType;23import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateTypeCertificateTypeDetails;24import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateTypeCertificateTypeDetailsCertificateTypeDetails;25import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateTypeCertificateTypeDetailsCertificateTypeDetailsCertificateTypeDetails;26import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateTypeCertificateTypeDetailsCertificateTypeDetailsCertificateTypeDetailsCertificateTypeDetails;27import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateTypeCertificateTypeDetailsCertificateTypeDetailsCertificateTypeDetailsCertificateTypeDetailsCertificateTypeDetails;28import org.openqa.selenium.devtools.v85.security.model.SecurityStateIssueTypeDetailsCertificateCertificateTypeCertificateTypeDetailsCertificateTypeDetailsCertificateTypeDetailsCertificateType

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1package com.test;2import org.openqa.selenium.devtools.DevTools;3import org.openqa.selenium.devtools.v91.browser.Browser;4import org.openqa.selenium.devtools.v91.browser.model.BrowserContextID;5import org.openqa.selenium.devtools.v91.browser.model.GetBrowserCommandLineResponse;6import org.openqa.selenium.devtools.v91.browser.model.GetVersionResponse;7import org.openqa.selenium.devtools.v91.browser.model.WindowID;8import org.openqa.selenium.devtools.v91.cdp.CdpEndpointFinder;9import org.openqa.selenium.devtools.v91.cdp.CdpEndpointInfo;10import org.openqa.selenium.devtools.v91.cdp.CdpVersion;11import org.openqa.selenium.devtools.v91.cdp.CdpVersionFinder;12import org.openqa.selenium.devtools.v91.cdp.model.CdpInfo;13import org.openqa.selenium.devtools.v91.cdp.model.CdpVersionInfo;14import org.openqa.selenium.devtools.v91.cdp.model.GetCdpInfoResponse;15import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionResponse;16import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionsResponse;17import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionsResponseItem;18import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionsResponseItemVersion;19import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionsResponseItemVersionVersion;20import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionsResponseItemVersionVersionVersion;21import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionsResponseItemVersionVersionVersionVersion;22import org.openqa.selenium.devtools.v91.cdp.model.GetCdpVersionsResponseItemVersionVersionVersionVersionVersion;23import java.util.List;24import java.util.Map;25import java.util.Optional;26import java.util.stream.Collectors;27public class CdpEndpointFinderTest {28 public static void main(String[] args) {29 CdpEndpointFinder finder = new CdpEndpointFinder();30 Optional<CdpEndpointInfo> info = finder.findCdpEndpointInfo();31 if (info.isPresent()) {32 CdpEndpointInfo cdpEndpointInfo = info.get();33 System.out.println("CdpEndpointInfo:" + cdpEndpointInfo);34 System.out.println("CdpVersion:" + cdpEndpointInfo.getCdpVersion());35 System.out.println("CdpEndpoint:" + cdpEndpointInfo.getCdpEndpoint());36 System.out.println("DevTools:" + cdpEndpoint

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.devtools.DevTools;2import org.openqa.selenium.devtools.v91.cdp.CdpEndpointFinder;3import org.openqa.selenium.devtools.v91.cdp.CdpEndpointFinder.CdpEndpoint;4import org.openqa.selenium.remote.RemoteWebDriver;5import org.openqa.selenium.remote.SessionId;6import org.openqa.selenium.support.ui.WebDriverWait;7import java.net.URI;8import java.util.List;9import java.util.stream.Collectors;10import java.util.stream.Stream;11import static java.util.concurrent.TimeUnit.SECONDS;12import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;13public class CdpEndpointFinderTest {14 public static void main(String[] args) {15 try {16 CdpEndpointFinder finder = new CdpEndpointFinder(driver);17 CdpEndpoint endpoint = finder.findCdpEndpoint();18 System.out.println(endpoint);19 System.out.println(endpoint.getBrowserVersion());20 System.out.println(endpoint.getBrowserMajorVersion());21 } finally {22 driver.quit();23 }24 }25}26import org.openqa.selenium.devtools.DevTools;27import org.openqa.selenium.devtools.v91.cdp.CdpEndpointFinder;28import org.openqa.selenium.devtools.v91.cdp.CdpEndpointFinder.CdpEndpoint;29import org.openqa.selenium.remote.RemoteWebDriver;30import org.openqa.selenium.remote.SessionId;31import org.openqa.selenium.support.ui.WebDriverWait;32import java.net.URI;33import java.util.List;34import java.util.stream.Collectors;35import java.util.stream.Stream;36import static java.util.concurrent.TimeUnit.SECONDS;37import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;38public class CdpEndpointFinderTest {39 public static void main(String[] args) {

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1CdpEndpointFinder finder = new CdpEndpointFinder();2URL endpoint = finder.findCdpEndpoint();3System.out.println(endpoint);4CdpEndpointFinder finder = new CdpEndpointFinder();5URL endpoint = finder.findCdpEndpoint();6System.out.println(endpoint);7CdpEndpointFinder finder = new CdpEndpointFinder();8URL endpoint = finder.findCdpEndpoint();9System.out.println(endpoint);10CdpEndpointFinder finder = new CdpEndpointFinder();11URL endpoint = finder.findCdpEndpoint();12System.out.println(endpoint);13CdpEndpointFinder finder = new CdpEndpointFinder();14URL endpoint = finder.findCdpEndpoint();15System.out.println(endpoint);16CdpEndpointFinder finder = new CdpEndpointFinder();17URL endpoint = finder.findCdpEndpoint();18System.out.println(endpoint);19CdpEndpointFinder finder = new CdpEndpointFinder();20URL endpoint = finder.findCdpEndpoint();21System.out.println(endpoint);22CdpEndpointFinder finder = new CdpEndpointFinder();23URL endpoint = finder.findCdpEndpoint();24System.out.println(endpoint);25CdpEndpointFinder finder = new CdpEndpointFinder();26URL endpoint = finder.findCdpEndpoint();27System.out.println(endpoint);28CdpEndpointFinder finder = new CdpEndpointFinder();29URL endpoint = finder.findCdpEndpoint();30System.out.println(endpoint);31CdpEndpointFinder finder = new CdpEndpointFinder();32URL endpoint = finder.findCdpEndpoint();33System.out.println(endpoint);34CdpEndpointFinder finder = new CdpEndpointFinder();35URL endpoint = finder.findCdpEndpoint();36System.out.println(endpoint

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.devtools.CdpEndpointFinder;2import org.openqa.selenium.devtools.DevTools;3import org.openqa.selenium.devtools.v91.browser.Browser;4import org.openqa.selenium.devtools.v91.browser.model.BrowserContextID;5import org.openqa.selenium.devtools.v91.browser.model.GetVersionResponse;6import org.openqa.selenium.devtools.v91.browser.model.WindowID;7import org.openqa.selenium.devtools.v91.runtime.Runtime;8import org.openqa.selenium.devtools.v91.runtime.model.RemoteObject;9import org.openqa.selenium.devtools.v91.runtime.model.ScriptId;10import org.openqa.selenium.devtools.v91.runtime.model.StackTrace;11import org.openqa.selenium.devtools.v91.runtime.model.StackTraceId;12import org.openqa.selenium.devtools.v91.runtime.model.Value;13import java.util.concurrent.TimeUnit;14public class DevToolsExample {15 public static void main(String[] args) throws Exception {16 CdpEndpointFinder finder = new CdpEndpointFinder();17 finder.start();18 DevTools devTools = finder.connectToDevTools();19 BrowserContextID contextId = devTools.send(Browser.createBrowserContext());20 WindowID windowId = devTools.send(Browser.createWindow(contextId));21 devTools.send(Browser.activateWindow(windowId));22 devTools.send(Browser.setWindowBounds(windowId, 0, 0, 800, 600));23 devTools.send(Runtime.enable());24 devTools.send(Runtime.evaluate("document.querySelector('a[href*=downloads]').click()"));25 TimeUnit.SECONDS.sleep(5);26 ScriptId scriptId = devTools.send(Runtime.compileScript("document.querySelector('h1').innerText", "test", false, false));27 RemoteObject result = devTools.send(Runtime.runScript(scriptId, null, null, null, null, null, null, null, null, null));28 String text = result.getValue().asString();29 System.out.println(text);30 devTools.send(Browser.closeWindow(windowId));31 devTools.send(Browser.disposeBrowserContext(contextId));32 devTools.close();33 finder.stop();34 }35}

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1CdpEndpointFinder cdpEndpointFinder = new CdpEndpointFinder(driver);2String endpoint = cdpEndpointFinder.getWsEndpoint();3System.out.println("Endpoint: " + endpoint);4ChromeDriver driver2 = new ChromeDriver(new ChromeOptions().setExperimentalOption("debuggerAddress", endpoint));5System.out.println("Page Title: " + driver2.getTitle());6driver2.quit();

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.devtools.DevTools;2import org.openqa.selenium.devtools.v91.browser.Browser;3import org.openqa.selenium.devtools.v91.browser.model.Bounds;4import org.openqa.selenium.devtools.v91.browser.model.Size;5import java.util.concurrent.TimeUnit;6import static org.openqa.selenium.devtools.v91.browser.Browser.getVersion;7public class DevToolsTest {8 public static void main(String[] args) {9 DevTools devTools = CdpEndpointFinder.getDevTools();10 devTools.send(getVersion());11 devTools.send(getVersion()).thenAccept(version -> {12 System.out.println("Browser version: " + version.getUserAgent());13 });14 devTools.send(Browser.getWindowForTarget());15 devTools.send(Browser.getWindowForTarget()).thenAccept(window -> {16 System.out.println("Browser window id: " + window.getWindowId());17 });18 devTools.send(Browser.getWindowBounds(1));19 devTools.send(Browser.getWindowBounds(1)).thenAccept(bounds -> {20 System.out.println("Browser window bounds: " + bounds.getBounds());21 });22 devTools.send(Browser.setWindowBounds(1, new Bounds(0, 0, 700, 500, null, null, null, null)));23 devTools.send(Browser.setWindowBounds(1, new Bounds(0, 0, 700, 500, null, null, null, null))).thenAccept(bounds -> {24 System.out.println("Browser window bounds: " + bounds.getBounds());25 });26 devTools.send(Browser.getWindowBounds(1));27 devTools.send(Browser.getWindowBounds(1)).thenAccept(bounds -> {28 System.out.println("Browser window bounds: " + bounds.getBounds());29 });30 devTools.send(Browser.setWindowBounds(1, new Bounds(0, 0, 1000, 700, null, null, null, null)));31 devTools.send(Browser.setWindowBounds(1, new Bounds(0, 0, 1000, 700, null, null, null, null))).thenAccept(bounds -> {32 System.out.println("Browser window bounds: " + bounds.getBounds());33 });34 devTools.send(Browser

Full Screen

Full Screen

CdpEndpointFinder

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.devtools.CdpEndpointFinder;2import org.openqa.selenium.devtools.DevTools;3import org.openqa.selenium.devtools.v85.browser.Browser;4import org.openqa.selenium.devtools.v85.browser.model.BrowserContextID;5import org.openqa.selenium.devtools.v85.browser.model.WindowID;6import org.openqa.selenium.devtools.v85.emulation.Emulation;7import org.openqa.selenium.devtools.v85.page.Page;8import org.openqa.selenium.devtools.v85.page.model.FrameId;9import org.openqa.selenium.devtools.v85.runtime.Runtime;10import org.openqa.selenium.devtools.v85.runtime.model.RemoteObject;11import org.openqa.selenium.devtools.v85.security.Security;12import org.openqa.selenium.devtools.v85.security.model.SecurityState;13import org.openqa.selenium.remote.http.HttpClient;14import org.openqa.selenium.remote.http.HttpMethod;15import org.openqa.selenium.remote.http.HttpRequest;16import org.openqa.selenium.remote.http.HttpResponse;17import java.io.IOException;18import java.net.URI;19import java.util.List;20import java.util.concurrent.ExecutionException;21import java.util.concurrent.TimeUnit;22import static java.util.concurrent.TimeUnit.SECONDS;23import static org.openqa.selenium.devtools.v85.page.Page.enable;24import static org.openqa.selenium.devtools.v85.page.Page.navigate;25public class DevToolsExample {26 public static void main(String[] args) throws IOException, ExecutionException, InterruptedException {27 URI devtoolsEndpoint = CdpEndpointFinder.findCdpEndpoint();28 HttpClient.Factory factory = HttpClient.Factory.createDefault();29 HttpClient client = factory.createClient(devtoolsEndpoint);30 HttpRequest request = new HttpRequest(HttpMethod.GET, "/json/version");31 HttpResponse response = client.execute(request);32 String raw = response.getContentString();33 System.out.println(raw);34 DevTools devTools = new DevTools(devtoolsEndpoint);35 devTools.createSession();36 devTools.send(enable());37 devTools.send(Page.loadEventFired(pageLoadEventFired -> {38 devTools.send(Runtime.evaluate("document.title", null, null, null, null, null, null

Full Screen

Full Screen

Selenium 4 Tutorial:

LambdaTest’s Selenium 4 tutorial is covering every aspects of Selenium 4 testing with examples and best practices. Here you will learn basics, such as how to upgrade from Selenium 3 to Selenium 4, to some advanced concepts, such as Relative locators and Selenium Grid 4 for Distributed testing. Also will learn new features of Selenium 4, such as capturing screenshots of specific elements, opening a new tab or window on the browser, and new protocol adoptions.

Chapters:

  1. Upgrading From Selenium 3 To Selenium 4?: In this chapter, learn in detail how to update Selenium 3 to Selenium 4 for Java binding. Also, learn how to upgrade while using different build tools such as Maven or Gradle and get comprehensive guidance for upgrading Selenium.

  2. What’s New In Selenium 4 & What’s Being Deprecated? : Get all information about new implementations in Selenium 4, such as W3S protocol adaption, Optimized Selenium Grid, and Enhanced Selenium IDE. Also, learn what is deprecated for Selenium 4, such as DesiredCapabilites and FindsBy methods, etc.

  3. Selenium 4 With Python: Selenium supports all major languages, such as Python, C#, Ruby, and JavaScript. In this chapter, learn how to install Selenium 4 for Python and the features of Python in Selenium 4, such as Relative locators, Browser manipulation, and Chrom DevTool protocol.

  4. Selenium 4 Is Now W3C Compliant: JSON Wireframe protocol is retiring from Selenium 4, and they are adopting W3C protocol to learn in detail about the advantages and impact of these changes.

  5. How To Use Selenium 4 Relative Locator? : Selenium 4 came with new features such as Relative Locators that allow constructing locators with reference and easily located constructors nearby. Get to know its different use cases with examples.

  6. Selenium Grid 4 Tutorial For Distributed Testing: Selenium Grid 4 allows you to perform tests over different browsers, OS, and device combinations. It also enables parallel execution browser testing, reads up on various features of Selenium Grid 4 and how to download it, and runs a test on Selenium Grid 4 with best practices.

  7. Selenium Video Tutorials: Binge on video tutorials on Selenium by industry experts to get step-by-step direction from automating basic to complex test scenarios with Selenium.

Selenium 101 certifications:

LambdaTest also provides certification for Selenium testing to accelerate your career in Selenium automation testing.

Run Selenium automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in CdpEndpointFinder

Test Your Web Or Mobile Apps On 3000+ Browsers

Signup for free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful