{"id":24272,"date":"2020-11-03T03:06:30","date_gmt":"2020-11-03T03:06:30","guid":{"rendered":"https:\/\/app14743.cloudwayssites.com\/?p=24272"},"modified":"2021-12-06T11:08:06","modified_gmt":"2021-12-06T19:08:06","slug":"selenium-4-faqs","status":"publish","type":"post","link":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/","title":{"rendered":"Selenium 4 FAQs"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"777\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/selenium_4_faqs.png\" alt=\"selenium 4 faqs\" class=\"wp-image-24270\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/selenium_4_faqs.png 1600w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/selenium_4_faqs-300x146.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/selenium_4_faqs-1024x497.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/selenium_4_faqs-768x373.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/selenium_4_faqs-1536x746.png 1536w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n\n\n\n<p>I led a very engaging webinar session where I explored some of the upcoming features of Selenium 4 including relative locators, window management, and Chrome DevTool Protocol (CDP) APIs. <\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube aligncenter wp-block-embed is-type-rich is-provider-embed-handler wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Test Driving Selenium 4 - with Angie Jones [webinar recording]\" width=\"1160\" height=\"653\" src=\"https:\/\/www.youtube.com\/embed\/-5hiHWqxs8A?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>In fact, there were so many questions that I didn\u2019t have time to answer them all live. Therefore, I\u2019ve gone through and chosen the most frequently asked questions and have provided the answers below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h.6abapfg6ac36\">Relative Locators<\/h2>\n\n\n\n<p>Selenium 4 offers a new locator type called <a href=\"https:\/\/angiejones.tech\/selenium-4-relative-locators\/\" target=\"_blank\" rel=\"noopener noreferrer\">Relative Locators<\/a>, which allows you to identify elements in relation to other elements: such as find the element to the left of another element. Likewise, you can also find elements to the right, above, below, and near.<\/p>\n\n\n\n<ol><li><strong><em>How close above, to the left, &#8230; does the element have to be in order to be discovered? <\/em><br><br><\/strong><p>The elements must be greater than 0 pixels apart to be considered relatives. As shown here, sometimes elements <em>appear<\/em>&nbsp;to have different x and y coordinates, however, they can be overlapped in the DOM. In cases like these &#8211; where the x and\/or y coordinates of two elements are the same &#8211; the elements are not detected as relative to each other.<\/p><\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"677\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.08.02-PM-1024x677.jpg\" alt=\"\" class=\"wp-image-24283\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.08.02-PM-1024x677.jpg 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.08.02-PM-300x198.jpg 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.08.02-PM-768x508.jpg 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.08.02-PM.jpg 1230w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<ol start=\"2\"><li><strong><em>I&#8217;m struggling to see why we&#8217;d use Relative Locators when the web is supposed to be responsive. This clearly breaks with responsive design. Why not just use IDs or other reliable locators? <\/em><br><\/strong><br><p>You\u2019re correct. If you are going to test your application in various viewport sizes, then Relative Locators is not a great idea. As you can see here, our test immediately breaks when the application is placed in the dimensions of an iPhone because the positioning of the elements change.<\/p><img loading=\"lazy\" decoding=\"async\" width=\"1592\" height=\"883\" class=\"wp-image-24285\" style=\"width: 1592px;\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/image.png\" alt=\"\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/image.png 1592w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/image-300x166.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/image-1024x568.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/image-768x426.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/image-1536x852.png 1536w\" sizes=\"(max-width: 1592px) 100vw, 1592px\" \/><br><br><span style=\"font-size: inherit; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">My advice is to use Relative Locators sparingly, and even then, always think ahead about how reliable it will be for your given test requirements.<\/span> <br><br><p>I also strongly recommend you limit its use to interaction and not verification. If you need to verify the visual aspects of your application, <a href=\"https:\/\/auth.applitools.com\/users\/register\">visual testing<\/a>&nbsp;is a proven, reliable approach to do so. <\/p><\/li><\/ol>\n\n\n\n<ol start=\"3\"><li><strong><em>Does the element have to be in view to be able to use relative locators such as &#8220;is below&#8221;? <\/em><br><\/strong><br><p>The element does not have to be in view, but it does have to be present in the DOM. Under the covers, Selenium is calling the JavaScript function <strong>getBoundingClientRect()<\/strong> which will look within the DOM, not on the screen, for the element. <\/p><\/li><li><strong><em>How is the relative locator different from xpath axes such as preceding-sibling? <\/em><br><\/strong><br><p>Xpath axes use the DOM hierarchy to locate elements. Relative locators use x and y coordinates. So with relative locators, the elements do not need to be siblings. <\/p><\/li><li><strong><em>Can we extract a list of elements with relative locators? <\/em><br><\/strong><br><p>Yes, to find a list of elements that match a relative locator, use <strong>findElements<\/strong>.<span style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\"> <\/span><\/p><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/angiejones\/060e21c9e30e7553c7fcb0780561782d.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/angiejones\/060e21c9e30e7553c7fcb0780561782d\">Gist<\/a>.<\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h.aed6utclxouv\">Window and Tab Management<\/h2>\n\n\n\n<p>Opening a brand new window or tab in Selenium 3 wasn&#8217;t very intuitive as there was no built-in method to do this. Selenium 4 provides built-in support to create a new tab or window within the same driver session.<\/p>\n\n\n\n<ol><li><strong><em>Does the getWindowHandles() method still return all window handles, even for tabs? <\/em><br><\/strong><br><p>Yes, you still call <strong>getWindowHandles()<\/strong> and it works for multiple windows as well as multiple tabs.<\/p> <img loading=\"lazy\" decoding=\"async\" width=\"1226\" height=\"894\" class=\"wp-image-24294\" style=\"width: 1226px;\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.23.45-PM.jpg\" alt=\"\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.23.45-PM.jpg 1226w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.23.45-PM-300x219.jpg 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.23.45-PM-1024x747.jpg 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/Screen-Shot-2020-11-02-at-6.23.45-PM-768x560.jpg 768w\" sizes=\"(max-width: 1226px) 100vw, 1226px\" \/> <\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/angiejones\/0069465a3bfc8b0999f5f7d4412b8a5a.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/angiejones\/0069465a3bfc8b0999f5f7d4412b8a5a\">Gist<\/a>.<\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<ol start=\"2\"><li><strong><em>Does the new window\/tab use the same cookie store as the original, or a different cookie store? <\/em><br><\/strong><br><p>The new window\/tab uses a new cookie store. I tested this by opening an initial window with Selenium, adding a cookie, then opening a new tab. I checked the cookies in both tabs, and the new cookie was only in the first tab.<\/p><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/angiejones\/dd3f9fce6634fbd2af5c8f61fba6b2dd.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/angiejones\/dd3f9fce6634fbd2af5c8f61fba6b2dd\">Gist<\/a>.<\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p>  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h.o0o7naiem6gs\">Selenium Chrome DevTools APIs<\/h2>\n\n\n\n<p>Chrome DevTools Protocol (CDP) is a set of tools that enables you to access and control Chromium-based browsers via Chrome DevTools. Selenium 4 provides an API that is essentially a wrapper around the raw CDP commands, which makes it much easier to control the browser from within our test code.<\/p>\n\n\n\n<ol><li><strong><em>Do the Selenium Chrome DevTools APIs work in other browsers like Firefox or just the Chrome browser? <\/em><br><\/strong><br><p>Selenium Chrome DevTools APIs work in any Chromium-based browser. In fact, Selenium 4 introduces a new driver called ChromiumDriver. ChromeDriver and EdgeDriver are subclasses of ChromiumDriver. All of the CDP implementation is done in the ChromiumDriver and is inherited in ChromeDriver and EdgeDriver.<\/p> <p>Since Firefox is not a Chromium-based browser, the Selenium 4 CDP APIs are not available in the FirefoxDriver. <\/p><\/li><\/ol>\n\n\n\n<p><\/p>\n\n\n\n<ol start=\"2\"><li><strong><em>Can we read the responses of the http requests that happen while the user interacts with the page? <\/em><br><br><\/strong><p>Yep, you sure can! In fact, anything that you can do in Chrome DevTools, you can now do in Selenium 4!<\/p> <p>However, I do not advise attempting to use Selenium for API testing, as there are better tools designed for this purpose. But you can use it for interesting scenarios such as intercepting network requests, as demonstrated by Adi Ohana. This can be done using the new <strong>getDevTools()<\/strong>&nbsp;method available in ChromiumDriver (and its subclasses such as ChromeDriver and EdgeDriver).<\/p><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/adiohana\/0d7d174c63596cfd0b09f1e192b5b635.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/adiohana\/0d7d174c63596cfd0b09f1e192b5b635\">Gist<\/a>.<\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<ol start=\"3\"><li><em><strong>When mocking geolocation, how do we get the latitude and longitude values to use in the Selenium call? <br><\/strong><\/em><br><p>Great question! I use Google Maps to look up the location, and then get the longitude and latitude that way. You can see a full example from start to finish of <a rel=\"noopener noreferrer\" href=\"https:\/\/angiejones.tech\/selenium-4-mocking-geolocation\/\" target=\"_blank\">mocking geolocations with Selenium 4<\/a>. Specifically, step 3 shows how to capture the coordinates.<\/p> <figure><img loading=\"lazy\" decoding=\"async\" width=\"1600\" height=\"624\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/pasted-image-0.jpg\" class=\"wp-image-24271\" alt=\"pasted image 0\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/pasted-image-0.jpg 1600w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/pasted-image-0-300x117.jpg 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/pasted-image-0-1024x399.jpg 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/pasted-image-0-768x300.jpg 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/pasted-image-0-1536x599.jpg 1536w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/figure> <\/li><\/ol>\n\n\n\n<p><\/p>\n\n\n\n<ol start=\"4\"><li><strong><em>Is it possible to handle different time zones with Selenium 4? <\/em><br><\/strong><br><p>Yes, you can now <a rel=\"noopener noreferrer\" href=\"https:\/\/developers.google.com\/web\/updates\/2019\/10\/devtools#timezone\" target=\"_blank\">spoof the timezone<\/a>&nbsp;in Chrome DevTools, which means you can also do it in Selenium 4 by using the provided Selenium 4 API, <strong>setTimezoneOverride<\/strong>. <\/p><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/angiejones\/e696448ca66e1644ca3347d567605cba.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/angiejones\/e696448ca66e1644ca3347d567605cba\">Gist<\/a>.<\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<ol start=\"5\"><li> <strong>Can we modify the headers using Selenium Chrome DevTools APIs? <br><\/strong><br>Yes, you can use CDP to send additional headers, via the <strong>setExtraHTTPHeaders<\/strong>&nbsp;command. <br><br>For example, if I wanted to send a header named <em style=\"font-size: inherit; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">referrer<\/em><span style=\"font-size: inherit; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">&nbsp;and a value of <\/span><em style=\"font-size: inherit; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">angie<\/em><span style=\"font-size: inherit; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;\">, I could do so like this:<\/span><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-embed-handler wp-block-embed-embed-handler\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/angiejones\/b01a158d7b9904d38f145e945c15a8cd.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/angiejones\/b01a158d7b9904d38f145e945c15a8cd\">Gist<\/a>.<\/noscript><\/div>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h.v67hdns7hc6u\">When will Selenium 4 Be Released?<\/h2>\n\n\n\n<p>Ah yes, that\u2019s the most frequently asked question ? With such rich features, we\u2019re all waiting to be able to officially use Selenium 4. While you can <a href=\"https:\/\/app14743.cloudwayssites.com\/blog\/how-to-install-selenium-4\/\">install Selenium 4<\/a>\u2019s alpha version now to play around with it, no release date has been set.<\/p>\n\n\n\n<p>I do encourage you to try Selenium 4 now to see how you will be able to utilize features such as relative locators, window\/tab management, and the Chrome DevTools APIs to improve your testing. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Opening a brand new window or tab in Selenium 3 wasn&#8217;t very intuitive as there was no built-in method to do this. Selenium 4 provides built-in support to create a new tab or window within the same driver session.<\/p>\n","protected":false},"author":31,"featured_media":24316,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10004],"tags":[10061,10139,12688,12690],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.5 (Yoast SEO v24.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Selenium 4 FAQs - AI-Powered End-to-End Testing | Applitools<\/title>\n<meta name=\"description\" content=\"Angie Jones takes this opportunity to answer some of your detailed questions about the new features in Selenium 4. Enjoy the FAQs!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Selenium 4 FAQs\" \/>\n<meta property=\"og:description\" content=\"Opening a brand new window or tab in Selenium 3 wasn&#039;t very intuitive as there was no built-in method to do this. Selenium 4 provides built-in support to create a new tab or window within the same driver session.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/\" \/>\n<meta property=\"og:site_name\" content=\"AI-Powered End-to-End Testing | Applitools\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-03T03:06:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-06T19:08:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1680\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Angie Jones\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Angie Jones\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/\"},\"author\":{\"name\":\"Angie Jones\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/bef60d60f816d3253a3e37120c0b9bba\"},\"headline\":\"Selenium 4 FAQs\",\"datePublished\":\"2020-11-03T03:06:30+00:00\",\"dateModified\":\"2021-12-06T19:08:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/\"},\"wordCount\":1137,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg\",\"keywords\":[\"Functional Testing\",\"Selenium\",\"Technical Leaders\",\"Test Engineers\"],\"articleSection\":[\"Advanced Topics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/\",\"name\":\"Selenium 4 FAQs - AI-Powered End-to-End Testing | Applitools\",\"isPartOf\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg\",\"datePublished\":\"2020-11-03T03:06:30+00:00\",\"dateModified\":\"2021-12-06T19:08:06+00:00\",\"description\":\"Angie Jones takes this opportunity to answer some of your detailed questions about the new features in Selenium 4. Enjoy the FAQs!\",\"breadcrumb\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg\",\"contentUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg\",\"width\":1680,\"height\":1260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/app14743.cloudwayssites.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advanced Topics\",\"item\":\"https:\/\/app14743.cloudwayssites.com\/blog\/category\/advanced-topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Selenium 4 FAQs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#website\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/\",\"name\":\"Applitools Visual AI\",\"description\":\"Applitools delivers full end-to-end test automation with AI infused at every step.\",\"publisher\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/app14743.cloudwayssites.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#organization\",\"name\":\"Applitools\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png\",\"contentUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png\",\"width\":156,\"height\":28,\"caption\":\"Applitools\"},\"image\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/bef60d60f816d3253a3e37120c0b9bba\",\"name\":\"Angie Jones\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/60864923503620d0b54e2493ef75b9d8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/60864923503620d0b54e2493ef75b9d8?s=96&d=mm&r=g\",\"caption\":\"Angie Jones\"},\"url\":\"https:\/\/app14743.cloudwayssites.com\/blog\/author\/angiejones\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Selenium 4 FAQs - AI-Powered End-to-End Testing | Applitools","description":"Angie Jones takes this opportunity to answer some of your detailed questions about the new features in Selenium 4. Enjoy the FAQs!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/","og_locale":"en_US","og_type":"article","og_title":"Selenium 4 FAQs","og_description":"Opening a brand new window or tab in Selenium 3 wasn't very intuitive as there was no built-in method to do this. Selenium 4 provides built-in support to create a new tab or window within the same driver session.","og_url":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/","og_site_name":"AI-Powered End-to-End Testing | Applitools","article_published_time":"2020-11-03T03:06:30+00:00","article_modified_time":"2021-12-06T19:08:06+00:00","og_image":[{"width":1680,"height":1260,"url":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg","type":"image\/jpeg"}],"author":"Angie Jones","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Angie Jones","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#article","isPartOf":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/"},"author":{"name":"Angie Jones","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/bef60d60f816d3253a3e37120c0b9bba"},"headline":"Selenium 4 FAQs","datePublished":"2020-11-03T03:06:30+00:00","dateModified":"2021-12-06T19:08:06+00:00","mainEntityOfPage":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/"},"wordCount":1137,"commentCount":0,"publisher":{"@id":"https:\/\/app14743.cloudwayssites.com\/#organization"},"image":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage"},"thumbnailUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg","keywords":["Functional Testing","Selenium","Technical Leaders","Test Engineers"],"articleSection":["Advanced Topics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/","url":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/","name":"Selenium 4 FAQs - AI-Powered End-to-End Testing | Applitools","isPartOf":{"@id":"https:\/\/app14743.cloudwayssites.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage"},"image":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage"},"thumbnailUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg","datePublished":"2020-11-03T03:06:30+00:00","dateModified":"2021-12-06T19:08:06+00:00","description":"Angie Jones takes this opportunity to answer some of your detailed questions about the new features in Selenium 4. Enjoy the FAQs!","breadcrumb":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#primaryimage","url":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg","contentUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/11\/david-pisnoy-S_ao-YqXl2w-unsplash.jpg","width":1680,"height":1260},{"@type":"BreadcrumbList","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/selenium-4-faqs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/app14743.cloudwayssites.com\/"},{"@type":"ListItem","position":2,"name":"Advanced Topics","item":"https:\/\/app14743.cloudwayssites.com\/blog\/category\/advanced-topics\/"},{"@type":"ListItem","position":3,"name":"Selenium 4 FAQs"}]},{"@type":"WebSite","@id":"https:\/\/app14743.cloudwayssites.com\/#website","url":"https:\/\/app14743.cloudwayssites.com\/","name":"Applitools Visual AI","description":"Applitools delivers full end-to-end test automation with AI infused at every step.","publisher":{"@id":"https:\/\/app14743.cloudwayssites.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/app14743.cloudwayssites.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/app14743.cloudwayssites.com\/#organization","name":"Applitools","url":"https:\/\/app14743.cloudwayssites.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/","url":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png","contentUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png","width":156,"height":28,"caption":"Applitools"},"image":{"@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/bef60d60f816d3253a3e37120c0b9bba","name":"Angie Jones","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/60864923503620d0b54e2493ef75b9d8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/60864923503620d0b54e2493ef75b9d8?s=96&d=mm&r=g","caption":"Angie Jones"},"url":"https:\/\/app14743.cloudwayssites.com\/blog\/author\/angiejones\/"}]}},"_links":{"self":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/posts\/24272"}],"collection":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/comments?post=24272"}],"version-history":[{"count":0,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/posts\/24272\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/media\/24316"}],"wp:attachment":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/media?parent=24272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/categories?post=24272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/tags?post=24272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}