How to use htmlUnit method of org.openqa.selenium.remote.DesiredCapabilities class

Best Selenium code snippet using org.openqa.selenium.remote.DesiredCapabilities.htmlUnit

Source:DriverFactory.java Github

copy

Full Screen

...19import static org.openqa.selenium.firefox.FirefoxDriver.PROFILE;20import static org.openqa.selenium.remote.CapabilityType.ACCEPT_SSL_CERTS;21import static org.openqa.selenium.remote.DesiredCapabilities.chrome;22import static org.openqa.selenium.remote.DesiredCapabilities.firefox;23import static org.openqa.selenium.remote.DesiredCapabilities.htmlUnit;24@Slf4j25public class DriverFactory {26 private final static String CHROME = "chrome";27 private final static String FIREFOX = "firefox";28 private final static String HTMLUNIT = "htmlunit";29 private static DriverFactory dm;30 private static WebDriver driver;31 private static WebDriver proxyDriver;32 private static DriverFactory getInstance() {33 if (dm == null) {34 dm = new DriverFactory();35 }36 return dm;37 }38 public static WebDriver getProxyDriver(final String name) {39 return getDriver(name, true);40 }41 public static WebDriver getDriver(final String name) {42 return getDriver(name, false);43 }44 // Return the desired driver and clear all its cookies45 private static WebDriver getDriver(final String type, final boolean isProxyDriver) {46 final WebDriver retVal = getInstance().findOrCreate(type, isProxyDriver);47 try {48 if (!retVal.getCurrentUrl().equals("about:blank")) {49 retVal.manage().deleteAllCookies();50 }51 } catch (final Exception e) {52 log.error(e.getMessage());53 e.printStackTrace();54 }55 return retVal;56 }57 public static void quitAll() {58 log.debug("closing all webDrivers");59 try {60 if (driver != null) {61 driver.quit();62 }63 if (proxyDriver != null) {64 proxyDriver.quit();65 }66 } catch (final Exception e) {67 log.error("Error quitting webDriver: " + e.getMessage());68 e.printStackTrace();69 }70 }71 /*72 * Re-use drivers to reduce startup times73 */74 private WebDriver findOrCreate(final String type, final boolean isProxyDriver) {75 if (isProxyDriver) {76 if (proxyDriver != null) {77 return proxyDriver;78 }79 proxyDriver = createProxyDriver(type);80 return proxyDriver;81 } else {82 if (driver != null) {83 return driver;84 }85 driver = createDriver(type);86 return driver;87 }88 }89 private WebDriver createDriver(final String type) {90 if (type.equalsIgnoreCase(CHROME)) {91 return createChromeDriver(new DesiredCapabilities());92 } else if (type.equalsIgnoreCase(FIREFOX)) {93 return createFirefoxDriver(null);94 } else if (type.equalsIgnoreCase(HTMLUNIT)) {95 return createHtmlUnitDriver(null);96 }97 throw new RuntimeException("Unsupported WebDriver browser: " + type);98 }99 private WebDriver createProxyDriver(final String type) {100 if (type.equalsIgnoreCase(CHROME)) {101 return createChromeDriver(createProxyCapabilities(CHROME));102 } else if (type.equalsIgnoreCase(FIREFOX)) {103 return createFirefoxDriver(createProxyCapabilities(FIREFOX));104 } else if (type.equalsIgnoreCase(HTMLUNIT)) {105 return createHtmlUnitDriver(createProxyCapabilities(HTMLUNIT));106 }107 throw new RuntimeException("Unsupported WebDriver browser: " + type);108 }109 private WebDriver createChromeDriver(final DesiredCapabilities capabilities) {110 setProperty("webdriver.chrome.driver", Config.getInstance().getDefaultDriverPath());111 if (capabilities != null) {112 capabilities.setCapability(ACCEPT_SSL_CERTS, true);113 final ChromeOptions options = new ChromeOptions();114 options.addArguments("--test-type");115 capabilities.setCapability(CAPABILITY, options);116 return new ChromeDriver(capabilities);117 } else {118 return new ChromeDriver();119 }120 }121 private WebDriver createHtmlUnitDriver(DesiredCapabilities capabilities) {122 if (capabilities != null) {123 capabilities.setBrowserName("htmlunit");124 return new HtmlUnitDriver(capabilities);125 }126 capabilities = new DesiredCapabilities();127 capabilities.setBrowserName("htmlunit");128 capabilities.setCapability(ACCEPT_SSL_CERTS, true);129 return new HtmlUnitDriver(capabilities);130 }131 private WebDriver createFirefoxDriver(DesiredCapabilities capabilities) {132 final ProfilesIni allProfiles = new ProfilesIni();133 FirefoxProfile myProfile = allProfiles.getProfile("WebDriver");134 if (myProfile == null) {135 final File ffDir = new File(getProperty("user.dir") + separator + "ffProfile");136 if (!ffDir.exists()) {137 ffDir.mkdir();138 }139 myProfile = new FirefoxProfile(ffDir);140 }141 myProfile.setAcceptUntrustedCertificates(true);142 myProfile.setAssumeUntrustedCertificateIssuer(true);143 myProfile.setPreference("webdriver.load.strategy", "unstable");144 final String noProxyHosts = Config.getInstance().getNoProxyHosts();145 if (!noProxyHosts.isEmpty()) {146 myProfile.setPreference("network.proxy.no_proxies_on", noProxyHosts);147 }148 if (capabilities == null) {149 capabilities = new DesiredCapabilities();150 }151 capabilities.setCapability(PROFILE, myProfile);152 setProperty("webdriver.gecko.driver", Config.getInstance().getDefaultDriverPath());153 return new FirefoxDriver(new FirefoxOptions(capabilities));154 }155 private DesiredCapabilities createProxyCapabilities(final String type) {156 DesiredCapabilities capabilities = null;157 switch (type) {158 case CHROME:159 capabilities = chrome();160 break;161 case FIREFOX:162 capabilities = firefox();163 break;164 case HTMLUNIT:165 capabilities = htmlUnit();166 break;167 default:168 break;169 }170 final Proxy proxy = new Proxy();171 final Config instance = Config.getInstance();172 proxy.setHttpProxy(instance.getProxyHost() + ":" + instance.getProxyPort());173 proxy.setSslProxy(instance.getProxyHost() + ":" + instance.getProxyPort());174 capabilities.setCapability("proxy", proxy);175 return capabilities;176 }177}...

Full Screen

Full Screen

Source:DefaultDriverSessions.java Github

copy

Full Screen

...32 new ConcurrentHashMap<SessionId, shaded.org.openqa.selenium.remote.server.Session>();33 private static Map<Capabilities, String> defaultDrivers = new HashMap<Capabilities, String>() {{34 put(DesiredCapabilities.chrome(), "org.openqa.selenium.chrome.ChromeDriver");35 put(DesiredCapabilities.firefox(), "org.openqa.selenium.firefox.FirefoxDriver");36 put(DesiredCapabilities.htmlUnit(), "org.openqa.selenium.htmlunit.HtmlUnitDriver");37 put(DesiredCapabilities.internetExplorer(), "org.openqa.selenium.ie.InternetExplorerDriver");38 put(DesiredCapabilities.opera(), "com.opera.core.systems.OperaDriver");39 put(DesiredCapabilities.safari(), "org.openqa.selenium.safari.SafariDriver");40 put(DesiredCapabilities.phantomjs(), "org.openqa.selenium.phantomjs.PhantomJSDriver");41 }};42 public DefaultDriverSessions() {43 this(Platform.getCurrent(), new shaded.org.openqa.selenium.remote.server.DefaultDriverFactory());44 }45 public DefaultDriverSessions(46 shaded.org.openqa.selenium.remote.server.DriverFactory factory, Map<Capabilities, Class<? extends WebDriver>> drivers) {47 this.factory = factory;48 for (Map.Entry<Capabilities, Class<? extends WebDriver>> entry : drivers.entrySet()) {49 registerDriver(entry.getKey(), entry.getValue());50 }...

Full Screen

Full Screen

Source:ActiveSessionFactory.java Github

copy

Full Screen

...7import static org.openqa.selenium.remote.CapabilityType.BROWSER_NAME;8import static org.openqa.selenium.remote.DesiredCapabilities.chrome;9import static org.openqa.selenium.remote.DesiredCapabilities.edge;10import static org.openqa.selenium.remote.DesiredCapabilities.firefox;11import static org.openqa.selenium.remote.DesiredCapabilities.htmlUnit;12import static org.openqa.selenium.remote.DesiredCapabilities.internetExplorer;13import static org.openqa.selenium.remote.DesiredCapabilities.opera;14import static org.openqa.selenium.remote.DesiredCapabilities.operaBlink;15import static org.openqa.selenium.remote.DesiredCapabilities.phantomjs;16import static org.openqa.selenium.remote.DesiredCapabilities.safari;17import com.google.common.collect.ImmutableMap;18import org.openqa.selenium.Capabilities;19import org.openqa.selenium.SessionNotCreatedException;20import org.openqa.selenium.WebDriver;21import java.io.IOException;22import java.util.LinkedHashMap;23import java.util.Map;24import java.util.Objects;25import java.util.ServiceLoader;26import java.util.logging.Logger;27import java.util.stream.StreamSupport;28/**29 * Used to create new {@link ActiveSession} instances as required.30 */31public class ActiveSessionFactory {32 private final static Logger LOG = Logger.getLogger(ActiveSessionFactory.class.getName());33 private final Map<String, SessionFactory> factories;34 public ActiveSessionFactory() {35 Map<String, SessionFactory> builder = new LinkedHashMap<>();36 ImmutableMap.<String, String>builder()37 .put(chrome().getBrowserName(), "org.openqa.selenium.chrome.ChromeDriverService")38 .put(edge().getBrowserName(), "org.openqa.selenium.edge.EdgeDriverService")39 .put(firefox().getBrowserName(), "org.openqa.selenium.firefox.GeckoDriverService")40 .put(internetExplorer().getBrowserName(), "org.openqa.selenium.ie.InternetExplorerDriverService")41 .put(opera().getBrowserName(), "org.openqa.selenium.opera.OperaDriverService")42 .put(operaBlink().getBrowserName(), "org.openqa.selenium.ie.OperaDriverService")43 .put(phantomjs().getBrowserName(), "org.openqa.selenium.phantomjs.PhantomJSDriverService")44 .put(safari().getBrowserName(), "org.openqa.selenium.safari.SafariDriverService")45 .build()46 .entrySet().stream()47 .filter(e -> {48 try {49 Class.forName(e.getValue());50 return true;51 } catch (ClassNotFoundException cnfe) {52 return false;53 }54 })55 .forEach(e -> builder.put(e.getKey(), new ServicedSession.Factory(e.getValue())));56 // Attempt to bind the htmlunitdriver if it's present.57 try {58 Class<? extends WebDriver> clazz = Class.forName("org.openqa.selenium.htmlunit.HtmlUnitDriver")59 .asSubclass(WebDriver.class);60 builder.put(61 htmlUnit().getBrowserName(),62 new InMemorySession.Factory(new DefaultDriverProvider(htmlUnit(), clazz)));63 } catch (ReflectiveOperationException ignored) {64 // Just carry on. Everything is fine.65 }66 // Allow user-defined factories to override default ones67 StreamSupport.stream(ServiceLoader.load(DriverProvider.class).spliterator(), false)68 .forEach(p -> builder.put(p.getProvidedCapabilities().getBrowserName(), new InMemorySession.Factory(p)));69 this.factories = ImmutableMap.copyOf(builder);70 }71 public ActiveSession createSession(NewSessionPayload newSessionPayload) throws IOException {72 return newSessionPayload.stream()73 .map(this::determineBrowser)74 .filter(Objects::nonNull)75 .map(factory -> factory.apply(newSessionPayload))76 .filter(Objects::nonNull)...

Full Screen

Full Screen

Source:DesiredCapabilities.java Github

copy

Full Screen

...90 return this;91 }92 @Deprecated93 @VisibleForTesting94 public static DesiredCapabilities htmlUnit() {95 return new DesiredCapabilities(BrowserType.HTMLUNIT, "", Platform.ANY);96 }97}...

Full Screen

Full Screen

Source:DriverSessionTest.java Github

copy

Full Screen

...22 DriverFactory factory = new DriverFactory();23 new DriverSessions(Platform.MAC, factory);24 assertTrue(factory.hasMappingFor(DesiredCapabilities.chrome()));25 assertTrue(factory.hasMappingFor(DesiredCapabilities.firefox()));26 assertTrue(factory.hasMappingFor(DesiredCapabilities.htmlUnit()));27 assertFalse(factory.hasMappingFor(DesiredCapabilities.internetExplorer()));28 }29 public void testShouldRegisterCorrectDefaultsOnLinux() {30 DriverFactory factory = new DriverFactory();31 new DriverSessions(Platform.LINUX, factory);32 assertTrue(factory.hasMappingFor(DesiredCapabilities.chrome()));33 assertTrue(factory.hasMappingFor(DesiredCapabilities.firefox()));34 assertTrue(factory.hasMappingFor(DesiredCapabilities.htmlUnit()));35 assertFalse(factory.hasMappingFor(DesiredCapabilities.internetExplorer()));36 }37 public void testShouldRegisterCorrectDefaultsOnWindows() {38 DriverFactory factory = new DriverFactory();39 new DriverSessions(Platform.VISTA, factory);40 assertTrue(factory.hasMappingFor(DesiredCapabilities.chrome()));41 assertTrue(factory.hasMappingFor(DesiredCapabilities.firefox()));42 assertTrue(factory.hasMappingFor(DesiredCapabilities.htmlUnit()));43 assertTrue(factory.hasMappingFor(DesiredCapabilities.internetExplorer()));44 }45 public void testShouldBeAbleToRegisterOwnDriver() {46 DriverFactory factory = new DriverFactory();47 DriverSessions sessions = new DriverSessions(Platform.VISTA, factory);48 Capabilities capabilities = new DesiredCapabilities("foo", "1", Platform.ANY);49 sessions.registerDriver(capabilities, AbstractDriver.class);50 assertTrue(factory.hasMappingFor(capabilities));51 }52 public static abstract class AbstractDriver implements WebDriver {}53}...

Full Screen

Full Screen

Source:AllCapabilities.java Github

copy

Full Screen

...12 return Stream.of( //13 android(), //14 iphone(), //15 ipad(), //16 htmlUnit(), //17 chrome(), //18 firefox(), //19 edge(), //20 internetExplorer(), //21 safari(), //22 operaBlink() //23 );24 }25 private static Capabilities iphone() {26 return new DesiredCapabilities(BrowserType.IPHONE, "", Platform.MAC);27 }28 private static Capabilities ipad() {29 return new DesiredCapabilities(BrowserType.IPAD, "", Platform.MAC);30 }31 private static DesiredCapabilities android() {32 return new DesiredCapabilities(BrowserType.ANDROID, "", Platform.ANDROID);33 }34 public static DesiredCapabilities chrome() {35 LOG.info("Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`");36 return new DesiredCapabilities(BrowserType.CHROME, "", Platform.ANY);37 }38 public static DesiredCapabilities firefox() {39 LOG.info("Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`");40 DesiredCapabilities capabilities = new DesiredCapabilities(41 BrowserType.FIREFOX,42 "",43 Platform.ANY);44 capabilities.setCapability("acceptInsecureCerts", true);45 return capabilities;46 }47 public static DesiredCapabilities htmlUnit() {48 return new DesiredCapabilities(BrowserType.HTMLUNIT, "", Platform.ANY);49 }50 public static DesiredCapabilities edge() {51 LOG.info("Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`");52 return new DesiredCapabilities(BrowserType.EDGE, "", Platform.WINDOWS);53 }54 public static DesiredCapabilities internetExplorer() {55 DesiredCapabilities capabilities = new DesiredCapabilities(56 BrowserType.IE, "", Platform.WINDOWS);57 capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);58 return capabilities;59 }60 public static DesiredCapabilities operaBlink() {61 LOG.info("Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`");...

Full Screen

Full Screen

Source:HtmlUnitDriverTest.java Github

copy

Full Screen

1package com.seleniumsimplified.webdriver.drivers;23import com.gargoylesoftware.htmlunit.BrowserVersion;4import com.seleniumsimplified.webdriver.manager.Driver;5import org.junit.Test;6import org.openqa.selenium.Capabilities;7import org.openqa.selenium.Platform;8import org.openqa.selenium.WebDriver;9import org.openqa.selenium.htmlunit.HtmlUnitDriver;10import org.openqa.selenium.remote.CapabilityType;11import org.openqa.selenium.remote.DesiredCapabilities;1213import java.util.Map;1415import static org.hamcrest.core.Is.is;16import static org.junit.Assert.assertThat;1718public class HtmlUnitDriverTest {1920 @Test21 public void basicHTMLUnitDriverBrowserVersion(){2223 WebDriver htmlunit = new HtmlUnitDriver(BrowserVersion.FIREFOX_3_6);2425 htmlunit.get("http://www.compendiumdev.co.uk/selenium/basic_html_form.html");2627 assertThat(htmlunit.getTitle(), is("HTML Form Elements"));2829 htmlunit.quit();30 }3132 @Test33 public void basicHTMLUnitDriverJavascriptOn(){3435 WebDriver htmlunit = new HtmlUnitDriver(true);3637 htmlunit.get("http://www.compendiumdev.co.uk/selenium/basic_html_form.html");3839 assertThat(htmlunit.getTitle(), is("HTML Form Elements"));4041 htmlunit.quit();42 }4344 @Test45 public void basicHTMLUnitDriverCapabilities(){4647 DesiredCapabilities capabilities = new DesiredCapabilities();48 // setting this to false does not impact firefox49 capabilities.setJavascriptEnabled(true);5051 WebDriver htmlunit = new HtmlUnitDriver(capabilities);5253 htmlunit.get("http://www.compendiumdev.co.uk/selenium/basic_html_form.html");5455 assertThat(htmlunit.getTitle(), is("HTML Form Elements"));5657 htmlunit.quit();58 }5960 @Test61 public void basicHTMLUnitDriverProxyCapabilities(){6263 DesiredCapabilities capabilities = new DesiredCapabilities();64 // setting this to false does not impact firefox65 capabilities.setJavascriptEnabled(true);6667 org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();68 proxy.setHttpProxy(Driver.PROXY)69 .setFtpProxy(Driver.PROXY)70 .setSslProxy(Driver.PROXY);71 capabilities.setCapability(CapabilityType.PROXY, proxy);7273 WebDriver htmlunit = new HtmlUnitDriver(capabilities);7475 htmlunit.get("http://www.compendiumdev.co.uk/selenium/basic_html_form.html");7677 assertThat(htmlunit.getTitle(), is("HTML Form Elements"));7879 htmlunit.quit();80 }81} ...

Full Screen

Full Screen

Source:BrowserToCapabilities.java Github

copy

Full Screen

...18 case ff:19 caps = DesiredCapabilities.firefox();20 break;21 case htmlunit:22 caps = DesiredCapabilities.htmlUnit();23 caps.setJavascriptEnabled(false);24 break;25 case htmlunit_js:26 caps = DesiredCapabilities.htmlUnit();27 caps.setJavascriptEnabled(true);28 break;29 case ie:30 caps = DesiredCapabilities.internetExplorer();31 break;32 case opera:33 caps = DesiredCapabilities.opera();34 break;35 case phantomjs:36 caps = DesiredCapabilities.phantomjs();37 break;38 case safari:39 caps = DesiredCapabilities.safari();40 break;...

Full Screen

Full Screen

htmlUnit

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.remote.DesiredCapabilities;2import com.gargoylesoftware.htmlunit.BrowserVersion;3DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();4capabilities.setCapability("browserVersion", "firefox");5capabilities.setCapability("platform", "WINDOWS");6capabilities.setCapability("version", "11.0");7capabilities.setCapability("name", "Test Name");8capabilities.setCapability("build", "Test Build");9capabilities.setCapability("tags", "Test Tag");10capabilities.setCapability("passed", "true");11capabilities.setCapability("public", "true");12capabilities.setCapability("tunnelIdentifier", "Test Tunnel Identifier");13capabilities.setCapability("screenResolution", "800x600");14capabilities.setCapability("recordVideo", "true");15capabilities.setCapability("recordScreenshots", "true");16capabilities.setCapability("recordNetwork", "true");17capabilities.setCapability("timeZone", "Test Time Zone");18capabilities.setCapability("prerun", "Test Pre Run");19capabilities.setCapability("postrun", "Test Post Run");20capabilities.setCapability("browserstack.console", "errors");21capabilities.setCapability("browserstack.networkLogs", "true");22capabilities.setCapability("browserstack.debug", "true");23capabilities.setCapability("browserstack.local", "true");24capabilities.setCapability("browserstack.seleniumLogs", "true");25capabilities.setCapability("browserstack.selenium_version", "3.5.2");26capabilities.setCapability("browserstack.ie.noFlash", "true");27capabilities.setCapability("browserstack.ie.enablePopups", "true");28capabilities.setCapability("browserstack.ie.driver", "3.5.2");29capabilities.setCapability("browserstack.ie.usePerProcessProxy", "true");30capabilities.setCapability("browserstack.ie.enablePersistentHover", "true");31capabilities.setCapability("browserstack.ie.forceCreateProcessApi", "true");32capabilities.setCapability("browserstack.ie.forceShellWindowsApi", "true");33capabilities.setCapability("browserstack.ie.ensureCleanSession", "true");34capabilities.setCapability("browserstack.ie.enableElementCacheCleanup", "true");35capabilities.setCapability("browserstack.ie.browserCommandLineSwitches", "Test Browser Command Line Switches");36capabilities.setCapability("browserstack.ie.ensureCleanSession", "true");37capabilities.setCapability("browserstack.ie.enableElementCacheCleanup", "true");38capabilities.setCapability("browserstack.ie.browserCommandLineSwitches", "Test Browser Command Line Switches");39capabilities.setCapability("browserstack.ie.fileUploadDialogTimeout", "Test File Upload Dialog Timeout");

Full Screen

Full Screen

htmlUnit

Using AI Code Generation

copy

Full Screen

1DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();2WebDriver driver = new RemoteWebDriver(capabilities);3DesiredCapabilities capabilities = DesiredCapabilities.firefox();4WebDriver driver = new RemoteWebDriver(capabilities);5DesiredCapabilities capabilities = DesiredCapabilities.chrome();6WebDriver driver = new RemoteWebDriver(capabilities);7DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();8WebDriver driver = new RemoteWebDriver(capabilities);9DesiredCapabilities capabilities = DesiredCapabilities.safari();10WebDriver driver = new RemoteWebDriver(capabilities);11DesiredCapabilities capabilities = DesiredCapabilities.android();12WebDriver driver = new RemoteWebDriver(capabilities);13DesiredCapabilities capabilities = DesiredCapabilities.iPhone();14WebDriver driver = new RemoteWebDriver(capabilities);15DesiredCapabilities capabilities = DesiredCapabilities.ipad();16WebDriver driver = new RemoteWebDriver(cap

Full Screen

Full Screen

htmlUnit

Using AI Code Generation

copy

Full Screen

1DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();2capabilities.setBrowserName("htmlunit");3capabilities.setVersion("firefox");4capabilities.setPlatform(Platform.ANY);5driver.quit();6} catch (MalformedURLException e) {7e.printStackTrace();8}9}10}

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.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful