{"id":8883,"date":"2026-01-29T11:50:14","date_gmt":"2026-01-29T06:20:14","guid":{"rendered":"https:\/\/www.testleaf.com\/blog\/?post_type=web-story&#038;p=8883"},"modified":"2026-01-29T11:50:14","modified_gmt":"2026-01-29T06:20:14","slug":"6-ways-of-using-xpath-in-selenium-webdriverr","status":"publish","type":"web-story","link":"https:\/\/www.testleaf.com\/blog\/web-stories\/6-ways-of-using-xpath-in-selenium-webdriverr\/","title":{"rendered":"6 ways of using Xpath in Selenium WebDriver"},"content":{"rendered":"<p><html amp=\"\" lang=\"en\"><head><meta charSet=\"utf-8\"\/><meta name=\"viewport\" content=\"width=device-width,minimum-scale=1,initial-scale=1\"\/><script async=\"\" src=\"https:\/\/cdn.ampproject.org\/v0.js\"><\/script><script async=\"\" src=\"https:\/\/cdn.ampproject.org\/v0\/amp-story-1.0.js\" custom-element=\"amp-story\"><\/script><link href=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg\" rel=\"preload\" as=\"image\"\/>\n<style amp-boilerplate=\"\">body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}<\/style>\n<p><noscript><\/p>\n<style amp-boilerplate=\"\">body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}<\/style>\n<p><\/noscript><\/p>\n<style amp-custom=\"\">\n              h1, h2, h3 { font-weight: normal; }<\/p>\n<p>              amp-story-page {\n                background-color: #131516;\n              }<\/p>\n<p>              amp-story-grid-layer {\n                overflow: visible;\n              }<\/p>\n<p>              @media (max-aspect-ratio: 9 \/ 16)  {\n                @media (min-aspect-ratio: 320 \/ 678) {\n                  amp-story-grid-layer.grid-layer {\n                    margin-top: calc((100% \/ 0.5625 - 100% \/ 0.6666666666666666) \/ 2);\n                  }\n                }\n              }<\/p>\n<p>              @media not all and (min-resolution:.001dpcm) {\n                @media {\n                  p.text-wrapper > span {\n                    font-size: calc(100% - 0.5px);\n                  }\n                }\n              }<\/p>\n<p>              .page-fullbleed-area,\n              .page-background-overlay-area {\n                position: absolute;\n                overflow: hidden;\n                width: 100%;\n                left: 0;\n                height: calc(1.1851851851851851 * 100%);\n                top: calc((1 - 1.1851851851851851) * 100% \/ 2);\n              }<\/p>\n<p>              .element-overlay-area {\n                position: absolute;\n                width: 100%;\n                height: 100%;\n                top: 0;\n                left: 0;\n              }<\/p>\n<p>              .page-safe-area {\n                overflow: visible;\n                position: absolute;\n                top: 0;\n                bottom: 0;\n                left: 0;\n                right: 0;\n                width: 100%;\n                height: calc(0.84375 * 100%);\n                margin: auto 0;\n              }<\/p>\n<p>              .mask {\n                position: absolute;\n                overflow: hidden;\n              }<\/p>\n<p>              .fill {\n                position: absolute;\n                top: 0;\n                left: 0;\n                right: 0;\n                bottom: 0;\n                margin: 0;\n              }<\/p>\n<p>              @media (prefers-reduced-motion: no-preference) {\n                .animation-wrapper {\n                  opacity: var(--initial-opacity);\n                  transform: var(--initial-transform);\n                }\n              }<\/p>\n<p>              amp-story-grid-layer.align-bottom {\n                align-content: end;\n                padding: 0;\n                \/*\n                  AMP CTA Layer will exactly occupy 74px regardless of any device.\n                  To space out captions 74px from the BOTTOM (AMP CTA Layer),\n                  74px from the TOP should also be spaced out and thus: 2 * 74px\n                  will be the desired max-height.\n                *\/\n                max-height: calc(100vh - (2 * 74px));\n              }<\/p>\n<p>              .captions-area {\n                padding: 0 32px 0;\n              }<\/p>\n<p>              amp-story-captions {\n                margin-bottom: 16px;\n                text-align: center;\n              }<\/p>\n<p>              amp-story-audio-sticker {\n                height: 100%;\n              }<\/p>\n<p>              .audio-sticker {\n                font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;\n              }\n              <\/style>\n<p><meta name=\"web-stories-replace-head-start\"\/><title>6 ways of using Xpath in Selenium WebDriver<\/title><link rel=\"canonical\" href=\"https:\/\/www.testleaf.com\/blog\/?post_type=web-story&amp;p=8883\"\/><meta name=\"web-stories-replace-head-end\"\/><\/head><body><amp-story standalone=\"\" publisher=\"Testleaf\" publisher-logo-src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2022\/05\/favicon.png\" title=\"6 ways of using Xpath in Selenium WebDriver\" poster-portrait-src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/cropped-six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg\"><amp-story-page id=\"88fad979-c0a9-4cfd-b828-716f844a24aa\" auto-advance-after=\"7s\"><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#125443\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-df0c8803-18f9-48c6-9230-367b3ec6532a\">\n<div style=\"position:absolute;width:100%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg\" alt=\"six ways of using Xpath in Selenium Webdriverr\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x267.jpg 150w\" sizes=\"(min-width: 1024px) 45vh, 100vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\"><\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-page-outlink layout=\"nodisplay\" cta-image=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-300x300.png\"><a href=\"https:\/\/www.testleaf.com\/blog\/6-ways-to-use-xpath-in-selenium-webdriver\/?utm_source=Web-Story&amp;utm_medium=Organic&amp;utm_campaign=Web_Story\" rel=\"\">Learn more<\/a><\/amp-story-page-outlink><\/amp-story-page><amp-story-page id=\"ba78a981-3d89-4225-9ef4-cf4a0d5d1964\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-d8687d27-d098-490c-bf66-0ba20dbe5dcc [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#d9dbd5\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-d8687d27-d098-490c-bf66-0ba20dbe5dcc\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-94784a8f-87af-4a52-bcec-3c025118cb7c\">\n<div style=\"position:absolute;width:100%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1.jpg\" alt=\"six ways of using Xpath in Selenium Webdriver (1)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x267.jpg 150w\" sizes=\"(min-width: 1024px) 45vh, 100vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\"><\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"6ea3a33f-7753-419f-a59e-ffc02bd5ae93\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-f9c763a4-c1d6-4247-89ab-ee3f0656dcb8 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#d9dbd5\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-f9c763a4-c1d6-4247-89ab-ee3f0656dcb8\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-a5ea25a5-a89e-4f0a-9eaa-787ae8e33c40\">\n<div style=\"position:absolute;width:100%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2.jpg\" alt=\"six ways of using Xpath in Selenium Webdriver (2)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x267.jpg 150w\" sizes=\"(min-width: 1024px) 45vh, 100vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\"><\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"6db44991-37d7-463b-a80b-11f28129cb8c\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-9b6f862b-07f8-4f80-908d-2dce9fb4ef4e [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#d9dbd5\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-9b6f862b-07f8-4f80-908d-2dce9fb4ef4e\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-310ba099-6799-45e9-94e3-3258088575a5\">\n<div style=\"position:absolute;width:100%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3.jpg\" alt=\"six ways of using Xpath in Selenium Webdriver (3)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x267.jpg 150w\" sizes=\"(min-width: 1024px) 45vh, 100vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\"><\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"acc20222-b7cc-47eb-b790-8aff05fe1ebb\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-63a168ca-9000-4bfa-a974-7f45a9a38912 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#d9dbd5\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-63a168ca-9000-4bfa-a974-7f45a9a38912\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-32d60ee6-bc1d-46ea-9da6-34e948188f75\">\n<div style=\"position:absolute;width:100%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4.jpg\" alt=\"six ways of using Xpath in Selenium Webdriver (4)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x267.jpg 150w\" sizes=\"(min-width: 1024px) 45vh, 100vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\"><\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"f74a0026-b3bf-4fea-bed2-c5b98b2f9bb0\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-fc5ce275-b15c-4112-a27b-cd82a80b18f6 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#d9dbd5\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-fc5ce275-b15c-4112-a27b-cd82a80b18f6\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-26f545bc-f40e-47b2-9fef-d432fc54ccee\">\n<div style=\"position:absolute;width:100%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5.jpg\" alt=\"six ways of using Xpath in Selenium Webdriver (5)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x267.jpg 150w\" sizes=\"(min-width: 1024px) 45vh, 100vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\"><\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"6719ba65-1385-46ba-bd73-89024eb0f906\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-d71c0275-73a4-41d1-a7cf-ee29303d20c0 [data-leaf-element=\\\"true\\\"]\",\"keyframes\":{\"transform\":[\"translate(0%, 0%) scale(1.5)\",\"translate(0%, 0%) scale(1)\"]},\"delay\":0,\"duration\":2000,\"easing\":\"cubic-bezier(.3,0,.55,1)\",\"fill\":\"forwards\"}]<\/script><\/amp-story-animation><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\" style=\"background-color:#d9dbd5\">\n<div class=\"page-safe-area\">\n<div style=\"position:absolute;pointer-events:none;left:0;top:-9.25926%;width:100%;height:118.51852%;opacity:1\">\n<div id=\"anim-d71c0275-73a4-41d1-a7cf-ee29303d20c0\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0\" class=\"mask\" id=\"el-8f915b95-9820-4737-9168-3b805ed7c499\">\n<div style=\"position:absolute;width:100%;height:100%;left:0%;top:0%\" data-leaf-element=\"true\"><amp-img layout=\"fill\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver.jpg\" alt=\"six ways of using Xpath in Selenium Webdriver\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-150x267.jpg 150w\" sizes=\"(min-width: 1024px) 45vh, 100vw\" disable-inline-width=\"true\"><\/amp-img><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><amp-story-grid-layer template=\"vertical\" aspect-ratio=\"412:618\" class=\"grid-layer\"><\/p>\n<div class=\"page-fullbleed-area\">\n<div class=\"page-safe-area\"><\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><\/amp-story><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>6 ways of using XPath in Selenium WebDriver\u2014learn absolute vs relative paths, contains(), starts-with(), text(), axes, and dynamic locators with examples + best practices for stable, flake-free tests.<\/p>\n","protected":false},"author":1,"featured_media":8891,"template":"","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","web_stories_publisher_logo":161,"web_stories_poster":[],"web_stories_products":[],"footnotes":""},"web_story_category":[],"web_story_tag":[],"class_list":["post-8883","web-story","type-web-story","status-publish","has-post-thumbnail","hentry"],"aioseo_notices":[],"amp_enabled":false,"story_data":{"version":47,"pages":[{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":586,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"df0c8803-18f9-48c6-9230-367b3ec6532a","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-169x300.jpg","width":169,"height":300,"filesize":8746,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-169x300.jpg"},"large":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-576x1024.jpg","width":576,"height":1024,"filesize":44565,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-576x1024.jpg"},"thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x150.jpg","width":150,"height":150,"filesize":5310,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x150.jpg","width":150,"height":150,"filesize":5310,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x150.jpg"},"rpg_gallery_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x150.jpg","width":150,"height":150,"filesize":5310,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x150.jpg"},"web-stories-poster-portrait":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-640x853.jpg","width":640,"height":853,"filesize":44945,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-640x853.jpg"},"web-stories-publisher-logo":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-96x96.jpg","width":96,"height":96,"filesize":3053,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-96x96.jpg"},"web-stories-thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x267.jpg","width":150,"height":267,"filesize":7471,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr-150x267.jpg"},"full":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#125443","blurHash":"UTPZ.Gof^,j[~qoet7j[=~j[9ra{4nj[RjWV","creationDate":"2026-01-29T06:16:56","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg","id":8890,"alt":"six ways of using Xpath in Selenium Webdriverr","local":false,"provider":"local"}}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"id":"88fad979-c0a9-4cfd-b828-716f844a24aa","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"53b7f2cd-3967-4ee5-ae73-eda62a339f73"},"animations":[],"pageAttachment":{"url":"https:\/\/www.testleaf.com\/blog\/6-ways-to-use-xpath-in-selenium-webdriver\/?utm_source=Web-Story&utm_medium=Organic&utm_campaign=Web_Story","icon":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2022\/05\/favicon-300x300.png","needsProxy":false}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":586,"mask":{"type":"rectangle"},"isBackground":true,"type":"image","id":"94784a8f-87af-4a52-bcec-3c025118cb7c","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-169x300.jpg","width":169,"height":300,"filesize":5171,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-169x300.jpg"},"large":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-576x1024.jpg","width":576,"height":1024,"filesize":25007,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-576x1024.jpg"},"thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x150.jpg","width":150,"height":150,"filesize":3433,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x150.jpg","width":150,"height":150,"filesize":3433,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x150.jpg"},"rpg_gallery_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x150.jpg","width":150,"height":150,"filesize":3433,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x150.jpg"},"web-stories-poster-portrait":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-640x853.jpg","width":640,"height":853,"filesize":22009,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-640x853.jpg"},"web-stories-publisher-logo":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-96x96.jpg","width":96,"height":96,"filesize":2196,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-96x96.jpg"},"web-stories-thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x267.jpg","width":150,"height":267,"filesize":4207,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1-150x267.jpg"},"full":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-1.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#d9dbd5","blurHash":"U:O|eAj]%Mofxtj[WAj]~qj]IUj[IUoMofj[","creationDate":"2026-01-29T06:16:52","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-1.jpg","id":8884,"alt":"six ways of using Xpath in Selenium Webdriver (1)","local":false,"provider":"local"}}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"id":"ba78a981-3d89-4225-9ef4-cf4a0d5d1964","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"a41111d5-162a-4109-9bd1-06674c719262"},"animations":[{"id":"ba0ed78b-019a-4438-9845-cc4881fcfb86","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["94784a8f-87af-4a52-bcec-3c025118cb7c"]}]},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-169x300.jpg","width":169,"height":300,"filesize":5189,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-169x300.jpg"},"large":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-576x1024.jpg","width":576,"height":1024,"filesize":25298,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-576x1024.jpg"},"thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x150.jpg","width":150,"height":150,"filesize":3465,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x150.jpg","width":150,"height":150,"filesize":3465,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x150.jpg"},"rpg_gallery_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x150.jpg","width":150,"height":150,"filesize":3465,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x150.jpg"},"web-stories-poster-portrait":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-640x853.jpg","width":640,"height":853,"filesize":22221,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-640x853.jpg"},"web-stories-publisher-logo":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-96x96.jpg","width":96,"height":96,"filesize":2204,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-96x96.jpg"},"web-stories-thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x267.jpg","width":150,"height":267,"filesize":4229,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2-150x267.jpg"},"full":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-2.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#d9dbd5","blurHash":"U:O|eAj]%Mofxtj[WAj]~qj]IUj[IUoMofj[","creationDate":"2026-01-29T06:16:53","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-2.jpg","id":8885,"alt":"six ways of using Xpath in Selenium Webdriver (2)","local":false,"provider":"local"},"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":586,"mask":{"type":"rectangle"},"isBackground":true,"id":"a5ea25a5-a89e-4f0a-9eaa-787ae8e33c40","type":"image"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"5d67b1fe-d8f8-40bb-8771-ff65208b88c3","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["a5ea25a5-a89e-4f0a-9eaa-787ae8e33c40"]}],"id":"6ea3a33f-7753-419f-a59e-ffc02bd5ae93","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"a41111d5-162a-4109-9bd1-06674c719262"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-169x300.jpg","width":169,"height":300,"filesize":5390,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-169x300.jpg"},"large":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-576x1024.jpg","width":576,"height":1024,"filesize":25965,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-576x1024.jpg"},"thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x150.jpg","width":150,"height":150,"filesize":3525,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x150.jpg","width":150,"height":150,"filesize":3525,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x150.jpg"},"rpg_gallery_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x150.jpg","width":150,"height":150,"filesize":3525,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x150.jpg"},"web-stories-poster-portrait":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-640x853.jpg","width":640,"height":853,"filesize":23020,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-640x853.jpg"},"web-stories-publisher-logo":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-96x96.jpg","width":96,"height":96,"filesize":2246,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-96x96.jpg"},"web-stories-thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x267.jpg","width":150,"height":267,"filesize":4336,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3-150x267.jpg"},"full":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-3.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#d9dbd5","blurHash":"U:O|eAj]%Mofxtj[WAj]~qj]IUj[IUoMofj[","creationDate":"2026-01-29T06:16:53","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-3.jpg","id":8886,"alt":"six ways of using Xpath in Selenium Webdriver (3)","local":false,"provider":"local"},"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":586,"mask":{"type":"rectangle"},"isBackground":true,"id":"310ba099-6799-45e9-94e3-3258088575a5","type":"image"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"d71322aa-33f4-4352-be7c-dfbb5a922b8e","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["310ba099-6799-45e9-94e3-3258088575a5"]}],"id":"6db44991-37d7-463b-a80b-11f28129cb8c","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"a41111d5-162a-4109-9bd1-06674c719262"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-169x300.jpg","width":169,"height":300,"filesize":5130,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-169x300.jpg"},"large":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-576x1024.jpg","width":576,"height":1024,"filesize":24663,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-576x1024.jpg"},"thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x150.jpg","width":150,"height":150,"filesize":3403,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x150.jpg","width":150,"height":150,"filesize":3403,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x150.jpg"},"rpg_gallery_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x150.jpg","width":150,"height":150,"filesize":3403,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x150.jpg"},"web-stories-poster-portrait":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-640x853.jpg","width":640,"height":853,"filesize":21600,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-640x853.jpg"},"web-stories-publisher-logo":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-96x96.jpg","width":96,"height":96,"filesize":2181,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-96x96.jpg"},"web-stories-thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x267.jpg","width":150,"height":267,"filesize":4164,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4-150x267.jpg"},"full":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-4.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#d9dbd5","blurHash":"U:O|eAj]%Mofxtj[WAj]~qj]IUj[IUoMofj[","creationDate":"2026-01-29T06:16:54","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-4.jpg","id":8887,"alt":"six ways of using Xpath in Selenium Webdriver (4)","local":false,"provider":"local"},"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":586,"mask":{"type":"rectangle"},"isBackground":true,"id":"32d60ee6-bc1d-46ea-9da6-34e948188f75","type":"image"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"b817b9a4-4843-4fca-b6e1-ab8ced7ec55a","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["32d60ee6-bc1d-46ea-9da6-34e948188f75"]}],"id":"acc20222-b7cc-47eb-b790-8aff05fe1ebb","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"a41111d5-162a-4109-9bd1-06674c719262"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-169x300.jpg","width":169,"height":300,"filesize":5261,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-169x300.jpg"},"large":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-576x1024.jpg","width":576,"height":1024,"filesize":25469,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-576x1024.jpg"},"thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x150.jpg","width":150,"height":150,"filesize":3466,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x150.jpg","width":150,"height":150,"filesize":3466,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x150.jpg"},"rpg_gallery_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x150.jpg","width":150,"height":150,"filesize":3466,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x150.jpg"},"web-stories-poster-portrait":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-640x853.jpg","width":640,"height":853,"filesize":22417,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-640x853.jpg"},"web-stories-publisher-logo":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-96x96.jpg","width":96,"height":96,"filesize":2231,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-96x96.jpg"},"web-stories-thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x267.jpg","width":150,"height":267,"filesize":4261,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5-150x267.jpg"},"full":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-5.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#d9dbd5","blurHash":"U:O|eAj]%Mofxtj[WAj]~qj]IUj[IUoMofj[","creationDate":"2026-01-29T06:16:55","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-5.jpg","id":8888,"alt":"six ways of using Xpath in Selenium Webdriver (5)","local":false,"provider":"local"},"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":586,"mask":{"type":"rectangle"},"isBackground":true,"id":"26f545bc-f40e-47b2-9fef-d432fc54ccee","type":"image"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"bfebda65-cc06-4060-9f0e-82da6d96fd10","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["26f545bc-f40e-47b2-9fef-d432fc54ccee"]}],"id":"f74a0026-b3bf-4fea-bed2-c5b98b2f9bb0","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"a41111d5-162a-4109-9bd1-06674c719262"}},{"elements":[{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-169x300.jpg","width":169,"height":300,"filesize":5383,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-169x300.jpg"},"large":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-576x1024.jpg","width":576,"height":1024,"filesize":26113,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-576x1024.jpg"},"thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-150x150.jpg","width":150,"height":150,"filesize":3523,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-150x150.jpg","width":150,"height":150,"filesize":3523,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-150x150.jpg"},"rpg_gallery_thumb":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-150x150.jpg","width":150,"height":150,"filesize":3523,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-150x150.jpg"},"web-stories-poster-portrait":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-640x853.jpg","width":640,"height":853,"filesize":23222,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-640x853.jpg"},"web-stories-publisher-logo":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-96x96.jpg","width":96,"height":96,"filesize":2249,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-96x96.jpg"},"web-stories-thumbnail":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver-150x267.jpg","width":150,"height":267,"filesize":4373,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver-150x267.jpg"},"full":{"file":"six-ways-of-using-Xpath-in-Selenium-Webdriver.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#d9dbd5","blurHash":"U:O|eAj]%Mofxtj[WAj]~qj]IUj[IUoMofj[","creationDate":"2026-01-29T06:16:55","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/six-ways-of-using-Xpath-in-Selenium-Webdriver.jpg","id":8889,"alt":"six ways of using Xpath in Selenium Webdriver","local":false,"provider":"local"},"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":48,"y":0,"width":330,"height":586,"mask":{"type":"rectangle"},"isBackground":true,"id":"8f915b95-9820-4737-9168-3b805ed7c499","type":"image"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"a85d6325-57c5-4c80-9b5f-1429c7d51f1c","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["8f915b95-9820-4737-9168-3b805ed7c499"]}],"id":"6719ba65-1385-46ba-bd73-89024eb0f906","defaultBackgroundElement":{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"x":1,"y":1,"width":1,"height":1,"mask":{"type":"rectangle"},"isBackground":true,"isDefaultBackground":true,"type":"shape","id":"a41111d5-162a-4109-9bd1-06674c719262"}}],"fonts":[],"autoAdvance":true,"defaultPageDuration":7,"currentStoryStyles":{"colors":[]}},"story_poster":{"id":8891,"url":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/cropped-six-ways-of-using-Xpath-in-Selenium-Webdriverr.jpg","width":640,"height":853,"needsProxy":false},"_links":{"self":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story\/8883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story"}],"about":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/types\/web-story"}],"author":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/users\/1"}],"version-history":[{"count":2,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story\/8883\/revisions"}],"predecessor-version":[{"id":8893,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story\/8883\/revisions\/8893"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/media\/8891"}],"wp:attachment":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/media?parent=8883"}],"wp:term":[{"taxonomy":"web_story_category","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web_story_category?post=8883"},{"taxonomy":"web_story_tag","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web_story_tag?post=8883"}],"wp:lock":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story\/8883\/lock"}],"wp:publisherlogo":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/media\/161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}