

{"id":80417,"date":"2020-08-07T13:32:56","date_gmt":"2020-08-07T08:02:56","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=80417"},"modified":"2021-05-12T11:08:31","modified_gmt":"2021-05-12T05:38:31","slug":"selenium-webdriver-architecture","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/","title":{"rendered":"Everything about Selenium Webdriver Architecture and Its Components"},"content":{"rendered":"<p>We know that Selenium is a browser automation tool that interacts with the browser and automates the testing of a web application. In this article, we will learn about Selenium WebDriver Architecture in detail.<\/p>\n<p>The architecture of Selenium WebDriver is all about how Selenium works internally. Let&#8217;s start our learning!!!<\/p>\n<h2>Selenium Webdriver Architecture<\/h2>\n<p>So, firstly, let\u2019s take a look at how Selenium WebDriver API interacts with the real browsers using browser drivers and understand significant blocks that comprise the Selenium WebDriver architecture.<\/p>\n<p>Furthermore, Selenium WebDriver comprises of four major components:<\/p>\n<ul>\n<li>Selenium Client Libraries<\/li>\n<li>JSON Wire Protocol<\/li>\n<li>WebDriver<\/li>\n<li>Operating System Browsers<\/li>\n<\/ul>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80440\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg\" alt=\"Selenium Webdriver Architecture\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<p>So, let&#8217;s have a look at each one of them in detail and what they help us with:<\/p>\n<h3>1. Selenium Client Libraries<\/h3>\n<p>Testers use the language which they are comfortable with to write automation scripts. There are several languages like Python, Perl, C#, Java, etc., in which one can write a script, so this can make the task easier and quicker.<\/p>\n<p>Moreover, Selenium client library binding facilitates the capability of multi-language programming support. You can use the language in which you are comfortable with to write your automation script, and Selenium will do the rest.<\/p>\n<p>To understand this more, for instance, if you want to write an automation script in PHP language, you would require the PHP client libraries, and the rest of the task will be done. You can easily download all the Selenium binding from Selenium official website.<\/p>\n<h3>2. JSON Wire Protocol<\/h3>\n<p>JavaScript Object Notation (JSON) Wire Protocol facilitates the capability of transferring the data between the Server and Client on the web. It is a REST API service that provides a transport mechanism and defines a RESTful web service using the JSON over HTTP.<\/p>\n<h3>3. WebDrivers<\/h3>\n<p>Drivers are useful for working with browsers and running the automation script instructions to the browsers. Browser drivers take care of the loss of any internal logic of browser functionalities. Each browser has its specific set of WebDriver.<\/p>\n<p>Following are some of the steps which are being involved in running automation script using the specific Browser driver:<\/p>\n<ul>\n<li>HTTP requests are generated for every script and sent to the browser driver.<\/li>\n<li>A specific browser driver receives the request via the server.<\/li>\n<li>The server sends all the instructions to perform a function which are executed on the browser.<\/li>\n<\/ul>\n<h3>4. Operating System Browsers<\/h3>\n<p>The best part about the Selenium WebDriver is that it supports all the major browsers like Firefox, Google Chrome, Apple Safari, IE, Edge, and Opera. Every browser has a specific WebDriver for executing automation scripts.<\/p>\n<h2>How Selenium WebDriver works Internally?<\/h2>\n<p>In a real-time scenario, you can write code using the Selenium IDE with any of the supported client libraries, say Java. For instance,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">WebDriver driver = new FirefoxDriver();\r\nDriver.get(\"https:\/\/www.data-flair.training\");<\/pre>\n<p>Once you complete with the above script, then you can simply click the Start Button and run the script. As you can see, using the above code,the Firefox browser will launch, and it will navigate you to the Data-flair training webpage.<\/p>\n<p>Each browser is handled in such a way that it could accept HTTP requests and process them based on the server.<\/p>\n<p>As soon as you have completed your work, commands will start executing over the browser. Let&#8217;s say you are not interested in working over the Firefox browser.<\/p>\n<p>In this case, you can use Google Chrome or any other browser in which you are interested. Here is a simple code to launch the Chrome browser and the required site.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">WebDriver driver = new ChromeDriver();\r\nDriver.get(\"https:\/\/www.data-flair.training\");<\/pre>\n<p>After running the code, it will launch the Chrome browser this time, not the Firefox browser. The process is the same, and the objective is also the same because it will open the Data flair training website, but call actions are completely different.<\/p>\n<p>If there is any POST HTTP request, then the action is being performed on the browser. If there is a GET HTTP request, then the corresponding response is generated at the browser end.<\/p>\n<h2>Conclusion<\/h2>\n<p>So, finally we have seen everything about the Selenium WebDriver Architecture and how it works on the different browsers and programming languages. Hope you liked the article.<\/p>\n<p><strong>Do not forget to share your feedback in the comment section.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We know that Selenium is a browser automation tool that interacts with the browser and automates the testing of a web application. In this article, we will learn about Selenium WebDriver Architecture in detail.&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":80440,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22825],"tags":[22872,22873],"class_list":["post-80417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-selenium-tutorials","tag-selenium-webdriver-architecture","tag-selenium-webdriver-working"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Everything about Selenium Webdriver Architecture and Its Components - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn abut selenium webdriver architecture and its components like Selenium Client Libraries,JSON Wire Protocol,WebDriver,Operating System Browsers\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Everything about Selenium Webdriver Architecture and Its Components - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn abut selenium webdriver architecture and its components like Selenium Client Libraries,JSON Wire Protocol,WebDriver,Operating System Browsers\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-07T08:02:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-12T05:38:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Everything about Selenium Webdriver Architecture and Its Components - DataFlair","description":"Learn abut selenium webdriver architecture and its components like Selenium Client Libraries,JSON Wire Protocol,WebDriver,Operating System Browsers","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:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/","og_locale":"en_US","og_type":"article","og_title":"Everything about Selenium Webdriver Architecture and Its Components - DataFlair","og_description":"Learn abut selenium webdriver architecture and its components like Selenium Client Libraries,JSON Wire Protocol,WebDriver,Operating System Browsers","og_url":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-08-07T08:02:56+00:00","article_modified_time":"2021-05-12T05:38:31+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Everything about Selenium Webdriver Architecture and Its Components","datePublished":"2020-08-07T08:02:56+00:00","dateModified":"2021-05-12T05:38:31+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/"},"wordCount":696,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg","keywords":["Selenium Webdriver Architecture","selenium webdriver working"],"articleSection":["Selenium Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/","url":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/","name":"Everything about Selenium Webdriver Architecture and Its Components - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg","datePublished":"2020-08-07T08:02:56+00:00","dateModified":"2021-05-12T05:38:31+00:00","description":"Learn abut selenium webdriver architecture and its components like Selenium Client Libraries,JSON Wire Protocol,WebDriver,Operating System Browsers","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/08\/Selenium-Webdriver-Architecture.jpg","width":1200,"height":628,"caption":"Selenium Webdriver Architecture"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/selenium-webdriver-architecture\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Selenium Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/selenium-tutorials\/"},{"@type":"ListItem","position":3,"name":"Everything about Selenium Webdriver Architecture and Its Components"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/80417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=80417"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/80417\/revisions"}],"predecessor-version":[{"id":94306,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/80417\/revisions\/94306"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/80440"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=80417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=80417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=80417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}