{"id":20806,"date":"2020-05-21T06:31:45","date_gmt":"2020-05-21T06:31:45","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=20806"},"modified":"2024-12-07T14:45:31","modified_gmt":"2024-12-07T14:45:31","slug":"what-is-selenium-router","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/what-is-selenium-router\/","title":{"rendered":"What is Selenium Router?"},"content":{"rendered":"<h2>What is Selenium Router?<\/h2>\n<p>In this tutorial, we will learn about Selenium Router. Router grid component is new feature in Selenium 4.0 Grid Architecture.<\/p>\n<h3>Selenium Router<\/h3>\n<p>Router is the entry point of the client requests. Router can receive two types of requests.<\/p>\n<ul>\n<li><strong>New session request<\/strong><\/li>\n<li><strong>&#8216;Sticky&#8217; request to an existing session<\/strong><\/li>\n<\/ul>\n<p>When a Router receives a new request, the request is added to the Session Queue.<\/p>\n<p><a href=\"https:\/\/www.testingdocs.com\/questions\/what-is-selenium-session-queue\/\">https:\/\/www.testingdocs.com\/questions\/what-is-selenium-session-queue\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20880\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-4-Grid-Components-1.png\" alt=\"Selenium 4 Grid Components\" width=\"1729\" height=\"879\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-4-Grid-Components-1.png 1729w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-4-Grid-Components-1-300x153.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-4-Grid-Components-1-1024x521.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-4-Grid-Components-1-768x390.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-4-Grid-Components-1-1536x781.png 1536w\" sizes=\"auto, (max-width: 1729px) 100vw, 1729px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Sticky request are requests for an existing session. If the request is sticky the Router will send the session-id information to the SessionMap, and in turn\u00a0 returns the worker node info where the existing session is currently running.<\/p>\n<p><a href=\"https:\/\/www.testingdocs.com\/questions\/what-is-selenium-sessionmap\/\">https:\/\/www.testingdocs.com\/questions\/what-is-selenium-sessionmap\/<\/a><\/p>\n<h3>How to Start?<\/h3>\n<p>Launch command prompt or Terminal<\/p>\n<p>Run the following command. Replace the jar name with the actual name within the angle brackets.<\/p>\n<p>\\&gt; java -jar &lt;selenium-4-server.jar&gt; router &#8211;sessions &lt;url&gt; &#8211;distributor &lt;distURL&gt; &#8211;sessionqueue &lt;queueURL&gt;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20837\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-Router-TestingDocs.png\" alt=\"Selenium Router \" width=\"1920\" height=\"776\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-Router-TestingDocs.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-Router-TestingDocs-300x121.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-Router-TestingDocs-1024x414.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-Router-TestingDocs-768x310.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Selenium-Router-TestingDocs-1536x621.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>To know more information on the command line switches issue the following command :<\/p>\n<p>\\&gt; java -jar &lt;selenium-server-4.jar&gt;\u00a0 router &#8211;help<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Selenium Router? In this tutorial, we will learn about Selenium Router. Router grid component is new feature in Selenium 4.0 Grid Architecture. Selenium Router Router is the entry point of the client requests. Router can receive two types of requests. New session request &#8216;Sticky&#8217; request to an existing session When a Router receives [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[185],"tags":[],"class_list":["post-20806","post","type-post","status-publish","format-standard","hentry","category-selenium","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/20806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=20806"}],"version-history":[{"count":23,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/20806\/revisions"}],"predecessor-version":[{"id":26255,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/20806\/revisions\/26255"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=20806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=20806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=20806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}