How to use DumpHttpExchangeFilter class of org.openqa.selenium.remote.http package

Best Selenium code snippet using org.openqa.selenium.remote.http.DumpHttpExchangeFilter

Source:RemoteWebDriverBuilder.java Github

copy

Full Screen

...27import org.openqa.selenium.WebDriverInfo;28import org.openqa.selenium.internal.Either;29import org.openqa.selenium.internal.Require;30import org.openqa.selenium.remote.http.ClientConfig;31import org.openqa.selenium.remote.http.DumpHttpExchangeFilter;32import org.openqa.selenium.remote.http.Filter;33import org.openqa.selenium.remote.http.HttpClient;34import org.openqa.selenium.remote.http.HttpHandler;35import org.openqa.selenium.remote.http.HttpRequest;36import org.openqa.selenium.remote.http.HttpResponse;37import org.openqa.selenium.remote.service.DriverService;38import java.io.Closeable;39import java.io.IOException;40import java.io.UncheckedIOException;41import java.net.URI;42import java.net.URISyntaxException;43import java.net.URL;44import java.util.ArrayList;45import java.util.Collection;46import java.util.List;47import java.util.Map;48import java.util.Optional;49import java.util.ServiceLoader;50import java.util.Set;51import java.util.TreeMap;52import java.util.function.Function;53import java.util.function.Supplier;54import java.util.logging.Logger;55import java.util.stream.Collectors;56import java.util.stream.StreamSupport;57import static java.util.logging.Level.WARNING;58import static org.openqa.selenium.internal.Debug.getDebugLogLevel;59import static org.openqa.selenium.remote.DriverCommand.QUIT;60import static org.openqa.selenium.remote.http.HttpMethod.DELETE;61/**62 * Create a new Selenium session using the W3C WebDriver protocol. This class will not generate any63 * data expected by the original JSON Wire Protocol, so will fail to create sessions as expected if64 * used against a server that only implements that protocol.65 * <p>66 * Expected usage is something like:67 * <pre>68 * WebDriver driver = RemoteWebDriver.builder()69 * .addAlternative(new FirefoxOptions())70 * .addAlternative(new ChromeOptions())71 * .addMetadata("cloud:key", "hunter2")72 * .setCapability("proxy", new Proxy())73 * .build();74 * </pre>75 * In this example, we ask for a session where the browser will be either Firefox or Chrome (we76 * don't care which), but where either browser will use the given {@link org.openqa.selenium.Proxy}.77 * In addition, we've added some metadata to the session, setting the "{@code cloud.key}" to be the78 * secret passphrase of our account with the cloud "Selenium as a Service" provider.79 * <p>80 * If no call to {@link #withDriverService(DriverService)} or {@link #address(URI)} is made, the81 * builder will use {@link ServiceLoader} to find all instances of {@link WebDriverInfo} and will82 * call {@link WebDriverInfo#createDriver(Capabilities)} for the first supported set of83 * capabilities.84 */85@Beta86public class RemoteWebDriverBuilder {87 private static final Logger LOG = Logger.getLogger(RemoteWebDriverBuilder.class.getName());88 private static final Set<String> ILLEGAL_METADATA_KEYS = ImmutableSet.of(89 "alwaysMatch",90 "capabilities",91 "desiredCapabilities",92 "firstMatch");93 private final List<Capabilities> requestedCapabilities = new ArrayList<>();94 private final Map<String, Object> additionalCapabilities = new TreeMap<>();95 private final Map<String, Object> metadata = new TreeMap<>();96 private Function<ClientConfig, HttpHandler> handlerFactory =97 config -> {98 HttpClient.Factory factory = HttpClient.Factory.createDefault();99 HttpClient client = factory.createClient(config);100 return client.with(101 next -> req -> {102 try {103 return client.execute(req);104 } finally {105 if (req.getMethod() == DELETE) {106 HttpSessionId.getSessionId(req.getUri()).ifPresent(id -> {107 if (("/session/" + id).equals(req.getUri())) {108 try {109 client.close();110 } catch (UncheckedIOException e) {111 LOG.log(WARNING, "Swallowing exception while closing http client", e);112 }113 factory.cleanupIdleClients();114 }115 });116 }117 }118 });119 };120 private ClientConfig clientConfig = ClientConfig.defaultConfig();121 private URI remoteHost = null;122 private DriverService driverService;123 private Credentials credentials = null;124 RemoteWebDriverBuilder() {125 // Access through RemoteWebDriver.builder126 }127 /**128 * Clears the current set of alternative browsers and instead sets the list of possible choices to129 * the arguments given to this method.130 */131 public RemoteWebDriverBuilder oneOf(Capabilities maybeThis, Capabilities... orOneOfThese) {132 Require.nonNull("Capabilities to use", maybeThis);133 if (!requestedCapabilities.isEmpty()) {134 LOG.log(getDebugLogLevel(), "Removing existing requested capabilities: " + requestedCapabilities);135 requestedCapabilities.clear();136 }137 addAlternative(maybeThis);138 for (Capabilities caps : orOneOfThese) {139 Require.nonNull("Capabilities to use", caps);140 addAlternative(caps);141 }142 return this;143 }144 /**145 * Add to the list of possible configurations that might be asked for. It is possible to ask for146 * more than one type of browser per session. For example, perhaps you have an extension that is147 * available for two different kinds of browser, and you'd like to test it).148 */149 public RemoteWebDriverBuilder addAlternative(Capabilities options) {150 Require.nonNull("Capabilities to use", options);151 requestedCapabilities.add(new ImmutableCapabilities(options));152 return this;153 }154 /**155 * Adds metadata to the outgoing new session request, which can be used by intermediary of end156 * nodes for any purpose they choose (commonly, this is used to request additional features from157 * cloud providers, such as video recordings or to set the timezone or screen size). Neither158 * parameter can be {@code null}.159 */160 public RemoteWebDriverBuilder addMetadata(String key, Object value) {161 Require.nonNull("Metadata key", key);162 Require.nonNull("Metadata value", value);163 if (ILLEGAL_METADATA_KEYS.contains(key)) {164 throw new IllegalArgumentException(String.format("Cannot add %s as metadata key", key));165 }166 Object previous = metadata.put(key, value);167 if (previous != null) {168 LOG.log(169 getDebugLogLevel(),170 String.format("Overwriting metadata %s. Previous value %s, new value %s", key, previous, value));171 }172 return this;173 }174 /**175 * Sets a capability for every single alternative when the session is created. These capabilities176 * are only set once the session is created, so this will be set on capabilities added via177 * {@link #addAlternative(Capabilities)} or {@link #oneOf(Capabilities, Capabilities...)} even178 * after this method call.179 */180 public RemoteWebDriverBuilder setCapability(String capabilityName, Object value) {181 Require.nonNull("Capability name", capabilityName);182 Require.nonNull("Capability value", value);183 Object previous = additionalCapabilities.put(capabilityName, value);184 if (previous != null) {185 LOG.log(186 getDebugLogLevel(),187 String.format("Overwriting capability %s. Previous value %s, new value %s", capabilityName, previous, value));188 }189 return this;190 }191 /**192 * @see #address(URI)193 */194 public RemoteWebDriverBuilder address(String uri) {195 Require.nonNull("Address", uri);196 try {197 return address(new URI(uri));198 } catch (URISyntaxException e) {199 throw new IllegalArgumentException("Unable to create URI from " + uri);200 }201 }202 /**203 * @see #address(URI)204 */205 public RemoteWebDriverBuilder address(URL url) {206 Require.nonNull("Address", url);207 try {208 return address(url.toURI());209 } catch (URISyntaxException e) {210 throw new IllegalArgumentException("Unable to create URI from " + url);211 }212 }213 /**214 * Set the URI of the remote server. If this URI is not set, then it assumed that a local running215 * remote webdriver session is needed. It is an error to call this method and also216 * {@link #withDriverService(DriverService)}.217 */218 public RemoteWebDriverBuilder address(URI uri) {219 Require.nonNull("URI", uri);220 if (driverService != null || (clientConfig.baseUri() != null && !clientConfig.baseUri().equals(uri))) {221 throw new IllegalArgumentException(222 "Attempted to set the base uri on both this builder and the http client config. " +223 "Please set in only one place. " + uri);224 }225 remoteHost = uri;226 return this;227 }228 public RemoteWebDriverBuilder authenticateAs(UsernameAndPassword usernameAndPassword) {229 Require.nonNull("User name and password", usernameAndPassword);230 this.credentials = usernameAndPassword;231 return this;232 }233 /**234 * Allows precise control of the {@link ClientConfig} to use with remote235 * instances. If {@link ClientConfig#baseUri(URI)} has been called, then236 * that will be used as the base URI for the session.237 */238 public RemoteWebDriverBuilder config(ClientConfig config) {239 Require.nonNull("HTTP client config", config);240 if (config.baseUri() != null) {241 if (remoteHost != null || driverService != null) {242 throw new IllegalArgumentException("Base URI has already been set. Cannot also set it via client config");243 }244 }245 this.clientConfig = config;246 return this;247 }248 /**249 * Use the given {@link DriverService} to set up the webdriver instance. It is an error to set250 * both this and also call {@link #address(URI)}.251 */252 public RemoteWebDriverBuilder withDriverService(DriverService service) {253 Require.nonNull("Driver service", service);254 if (clientConfig.baseUri() != null || remoteHost != null) {255 throw new IllegalArgumentException("Base URI has already been set. Cannot also set driver service.");256 }257 this.driverService = service;258 return this;259 }260 @VisibleForTesting261 RemoteWebDriverBuilder connectingWith(Function<ClientConfig, HttpHandler> handlerFactory) {262 Require.nonNull("Handler factory", handlerFactory);263 this.handlerFactory = handlerFactory;264 return this;265 }266 @VisibleForTesting267 WebDriver getLocalDriver() {268 if (remoteHost != null || clientConfig.baseUri() != null || driverService != null) {269 return null;270 }271 Set<WebDriverInfo> infos = StreamSupport.stream(272 ServiceLoader.load(WebDriverInfo.class).spliterator(),273 false)274 .filter(WebDriverInfo::isAvailable)275 .collect(Collectors.toSet());276 Capabilities additional = new ImmutableCapabilities(additionalCapabilities);277 Optional<Supplier<WebDriver>> first = requestedCapabilities.stream()278 .map(caps -> caps.merge(additional))279 .flatMap(caps ->280 infos.stream()281 .filter(WebDriverInfo::isAvailable)282 .filter(info -> info.isSupporting(caps))283 .map(info -> (Supplier<WebDriver>) () -> info.createDriver(caps)284 .orElseThrow(() -> new SessionNotCreatedException("Unable to create session with " + caps))))285 .findFirst();286 if (!first.isPresent()) {287 throw new SessionNotCreatedException("Unable to find matching driver for capabilities");288 }289 return first.get().get();290 }291 /**292 * Actually create a new WebDriver session. The returned webdriver is not guaranteed to be a293 * {@link RemoteWebDriver}.294 */295 public WebDriver build() {296 if (requestedCapabilities.isEmpty() && additionalCapabilities.isEmpty()) {297 throw new SessionNotCreatedException("One set of browser options must be specified");298 }299 Set<String> clobberedCapabilities = getClobberedCapabilities();300 if (!clobberedCapabilities.isEmpty()) {301 throw new IllegalArgumentException(String.format(302 "Unable to create session. Additional capabilities %s overwrite capabilities in requested options",303 clobberedCapabilities));304 }305 WebDriver driver = getLocalDriver();306 if (driver == null) {307 driver = getRemoteDriver();308 }309 return new Augmenter().augment(driver);310 }311 private WebDriver getRemoteDriver() {312 startDriverServiceIfNecessary();313 ClientConfig driverClientConfig = clientConfig;314 URI baseUri = getBaseUri();315 if (baseUri != null) {316 driverClientConfig = driverClientConfig.baseUri(baseUri);317 }318 if (credentials != null) {319 driverClientConfig = driverClientConfig.authenticateAs(credentials);320 }321 HttpHandler client = handlerFactory.apply(driverClientConfig);322 HttpHandler handler = Require.nonNull("Http handler", client)323 .with(new CloseHttpClientFilter(client)324 .andThen(new AddWebDriverSpecHeaders())325 .andThen(new ErrorFilter())326 .andThen(new DumpHttpExchangeFilter()));327 Either<SessionNotCreatedException, ProtocolHandshake.Result> result = null;328 try {329 result = new ProtocolHandshake().createSession(handler, getPayload());330 } catch (IOException e) {331 throw new SessionNotCreatedException("Unable to create new remote session.", e);332 }333 if (result.isRight()) {334 CommandExecutor executor = result.map(res -> createExecutor(handler, res));335 return new RemoteWebDriver(executor, new ImmutableCapabilities());336 } else {337 throw result.left();338 }339 }340 private URI getBaseUri() {...

Full Screen

Full Screen

Source:DumpHttpExchangeFilter.java Github

copy

Full Screen

...23import java.util.logging.Level;24import java.util.logging.Logger;25import java.util.stream.StreamSupport;26import static java.util.stream.Collectors.joining;27public class DumpHttpExchangeFilter implements Filter {28 public static final Logger LOG = Logger.getLogger(DumpHttpExchangeFilter.class.getName());29 private final Level logLevel;30 public DumpHttpExchangeFilter() {31 this(Debug.getDebugLogLevel());32 }33 public DumpHttpExchangeFilter(Level logLevel) {34 this.logLevel = Require.nonNull("Log level", logLevel);35 }36 @Override37 public HttpHandler apply(HttpHandler next) {38 return req -> {39 // Use the supplier to avoid messing with the request unless we're logging40 LOG.log(logLevel, () -> requestLogMessage(req));41 HttpResponse res = next.execute(req);42 LOG.log(logLevel, () -> responseLogMessage(res));43 return res;44 };45 }46 private void expandHeadersAndContent(StringBuilder builder, HttpMessage<?> message) {47 message.getHeaderNames().forEach(name -> {...

Full Screen

Full Screen

Source:DumpHttpExchangeFilterTest.java Github

copy

Full Screen

...5import static java.nio.charset.StandardCharsets.UTF_8;6import static org.assertj.core.api.Assertions.assertThat;7import static org.openqa.selenium.remote.http.Contents.string;8import static org.openqa.selenium.remote.http.HttpMethod.GET;9public class DumpHttpExchangeFilterTest {10 @Test11 public void shouldIncludeRequestAndResponseHeaders() {12 DumpHttpExchangeFilter dumpFilter = new DumpHttpExchangeFilter();13 String reqLog = dumpFilter.requestLogMessage(14 new HttpRequest(GET, "/foo").addHeader("Peas", "and Sausages"));15 assertThat(reqLog).contains("Peas");16 assertThat(reqLog).contains("and Sausages");17 String resLog = dumpFilter.responseLogMessage(new HttpResponse()18 .addHeader("Cheese", "Brie")19 .setContent(string("Hello, World!", UTF_8)));20 assertThat(resLog).contains("Cheese");21 assertThat(resLog).contains("Brie");22 }23 @Test24 public void shouldIncludeRequestContentInLogMessage() {25 DumpHttpExchangeFilter dumpFilter = new DumpHttpExchangeFilter();26 String reqLog = dumpFilter.requestLogMessage(27 new HttpRequest(GET, "/foo").setContent(Contents.string("Cheese is lovely", UTF_8)));28 assertThat(reqLog).contains("Cheese is lovely");29 }30 @Test31 public void shouldIncludeResponseCodeInLogMessage() {32 DumpHttpExchangeFilter dumpFilter = new DumpHttpExchangeFilter();33 String resLog = dumpFilter.responseLogMessage(34 new HttpResponse().setStatus(505));35 assertThat(resLog).contains("505");36 }37 @Test38 public void shouldIncludeBodyOfResponseInLogMessage() {39 DumpHttpExchangeFilter dumpFilter = new DumpHttpExchangeFilter();40 String resLog = dumpFilter.responseLogMessage(41 new HttpResponse().setContent(Contents.string("Peas", UTF_8)));42 assertThat(resLog).contains("Peas");43 }44}...

Full Screen

Full Screen

Source:ServiceForCombinedApi.java Github

copy

Full Screen

...3import io.restassured.response.Response;4import java.util.List;5import java.util.stream.Collectors;6import static consts.BusinessConfigs.page.*;7import static org.openqa.selenium.remote.http.DumpHttpExchangeFilter.LOG;8public class ServiceForCombinedApi {9 public List<String> combinedTestApiPart() {10 Response response = RestAssured11 .given()12 .when()13 .get(HOME_PAGE_API.getUrl() + "/services/public/products/page/0/30/DEFAULT/en/beach-bags")14 .then()15 .statusCode(200).extract().response();16 List<String> listOfItemsApi = response.jsonPath().getList("products.description.name");17 List<String> listOfItemsApiToLowerCase = listOfItemsApi.stream()18 .map(String::toLowerCase)19 .collect(Collectors.toList());20 LOG.info("List of item names from API are got");21 return listOfItemsApiToLowerCase;...

Full Screen

Full Screen

DumpHttpExchangeFilter

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.remote.http.DumpHttpExchangeFilter;2import org.openqa.selenium.remote.http.HttpClient;3import org.openqa.selenium.remote.http.HttpClient.Factory;4import org.openqa.selenium.remote.http.HttpRequest;5import org.openqa.selenium.remote.http.HttpResponse;6import org.openqa.selenium.remote.http.HttpResponse.Builder;7import org.openqa.selenium.remote.http.TextMessage;8public class DumpHttpExchangeFilterExample {9 public static void main(String[] args) {10 Factory factory = new HttpClient.Factory() {11 public HttpClient createClient(URL url) {12 return new HttpClient() {13 public HttpResponse execute(HttpRequest req) throws IOException {14 return new Builder()15 .addHeader("Content-Type", "text/html")16 .setContent(new TextMessage("Hello world"))17 .build();18 }19 };20 }21 };22 HttpResponse response = client.execute(new HttpRequest("GET", "/"));23 System.out.println(response);24 }25}26import org.openqa.selenium.remote.http.DumpHttpExchangeFilter;27import org.openqa.selenium.remote.http.HttpClient;28import org.openqa.selenium.remote.http.HttpClient.Factory;29import org.openqa.selenium.remote.http.HttpRequest;30import org.openqa.selenium.remote.http.HttpResponse;31import org.openqa.selenium.remote.http.HttpResponse.Builder;32import org.openqa.selenium.remote.http.TextMessage;33public class DumpHttpExchangeFilterExample {34 public static void main(String[] args) {35 Factory factory = new HttpClient.Factory() {36 public HttpClient createClient(URL url) {37 return new HttpClient() {38 public HttpResponse execute(HttpRequest req) throws IOException {39 return new Builder()40 .addHeader("Content-Type", "text/html")41 .setContent(new TextMessage("Hello world"))42 .build();43 }44 };45 }46 };47 HttpResponse response = client.execute(new HttpRequest("GET", "/"));48 System.out.println(response);49 }50}

Full Screen

Full Screen

DumpHttpExchangeFilter

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.remote.http.DumpHttpExchangeFilter;2import org.openqa.selenium.remote.http.HttpClient;3import org.openqa.selenium.remote.http.HttpClient.Factory;4import org.openqa.selenium.remote.http.HttpRequest;5import org.openqa.selenium.remote.http.HttpResponse;6import org.openqa.selenium.remote.http.HttpResponse.Body;7import org.openqa.selenium.remote.http.HttpResponse.Headers;8import org.openqa.selenium.remote.http.HttpResponse.State;9import org.openqa.selenium.remote.http.HttpResponse.WrappingBody;10import org.openqa.selenium.remote.http.HttpResponse.WrappingHeaders;11import org.openqa.selenium.remote.http.HttpResponse.WrappingState;12import org.openqa.selenium.remote.http.HttpVerb;13import java.io.BufferedReader;14import java.io.IOException;15import java.io.InputStreamReader;16import java.io.PrintWriter;17import java.io.Reader;18import java.io.StringWriter;19import java.net.URI;20import java.nio.charset.Charset;21import java.util.ArrayList;22import java.util.List;23import java.util.Objects;24import java.util.Optional;25import java.util.function.BiConsumer;26import java.util.function.BiFunction;27import java.util.function.Function;28import java.util.function.Supplier;29import java.util.stream.Collectors;30import java.util.stream.Stream;31public class DumpHttpExchangeFilter implements HttpClient.Filter {32 private final Function<HttpRequest, String> requestDumper;33 private final Function<HttpResponse, String> responseDumper;34 public DumpHttpExchangeFilter(Function<HttpRequest, String> requestDumper,35 Function<HttpResponse, String> responseDumper) {36 this.requestDumper = Objects.requireNonNull(requestDumper);37 this.responseDumper = Objects.requireNonNull(responseDumper);38 }39 public HttpResponse execute(HttpRequest req, Stream<HttpClient.Filter> chain) {40 System.out.println(requestDumper.apply(req));41 return chain.reduce((filter, next) -> next::execute)42 .orElse((request, filters) -> {43 throw new UnsupportedOperationException("No filters to execute");44 })45 .execute(req, chain)46 .thenApply(resp -> {47 System.out.println(responseDumper.apply(resp));48 return resp;49 });50 }51 public static Factory addRequestDumper(Factory clientFactory, Function<HttpRequest, String> dumper) {52 return addFilter(clientFactory, (req, chain) -> {53 System.out.println(dumper.apply(req));54 return chain.execute(req);55 });56 }57 public static Factory addResponseDumper(Factory clientFactory, Function<HttpResponse, String> dumper) {

Full Screen

Full Screen

DumpHttpExchangeFilter

Using AI Code Generation

copy

Full Screen

1package com.selenium4beginners.java.selenium;2import java.io.File;3import java.io.IOException;4import java.net.MalformedURLException;5import java.net.URL;6import java.util.HashMap;7import java.util.Map;8import org.openqa.selenium.By;9import org.openqa.selenium.WebDriver;10import org.openqa.selenium.WebElement;11import org.openqa.selenium.chrome.ChromeDriver;12import org.openqa.selenium.chrome.ChromeDriverService;13import org.openqa.selenium.chrome.ChromeOptions;14import org.openqa.selenium.devtools.DevTools;15import org.openqa.selenium.devtools.v85.network.Network;16import org.openqa.selenium.devtools.v85.network.model.ConnectionType;17import org.openqa.selenium.devtools.v85.network.model.Request;18import org.openqa.selenium.devtools.v85.network.model.ResourceType;19import org.openqa.selenium.devtools.v85.network.model.Response;20import org.openqa.selenium.remote.http.HttpClient;21import org.openqa.selenium.remote.http.HttpMethod;22import org.openqa.selenium.remote.http.HttpRequest;23import org.openqa.selenium.remote.http.HttpResponse;24import org.openqa.selenium.remote.http.Route;25public class DumpHttpExchangeFilter {26 public static void main(String[] args) throws MalformedURLException, IOException {27 ChromeDriverService service = new ChromeDriverService.Builder()28 .usingDriverExecutable(new File("C:\\Users\\Rahul\\Downloads\\chromedriver_win32\\chromedriver.exe"))29 .usingAnyFreePort().build();30 ChromeDriver driver = new ChromeDriver(service);31 DevTools devTools = driver.getDevTools();32 Map<String, Object> prefs = new HashMap<String, Object>();33 prefs.put("profile.default_content_setting_values.notifications", 2);34 ChromeOptions options = new ChromeOptions();35 options.setExperimentalOption("prefs", prefs);36 devTools.createSession();37 devTools.send(Network.enable(Optional.empty(), Optional.empty(), Optional.empty()));38 devTools.send(Network.enable(Optional.empty(), Optional

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 DumpHttpExchangeFilter

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