{"id":8942,"date":"2026-02-03T11:37:29","date_gmt":"2026-02-03T06:07:29","guid":{"rendered":"https:\/\/www.testleaf.com\/blog\/?post_type=web-story&#038;p=8942"},"modified":"2026-02-03T11:37:29","modified_gmt":"2026-02-03T06:07:29","slug":"how-to-write-a-playwright-script","status":"publish","type":"web-story","link":"https:\/\/www.testleaf.com\/blog\/web-stories\/how-to-write-a-playwright-script\/","title":{"rendered":"How to Write a Playwright Script"},"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:\/\/fonts.googleapis.com\/css2?display=swap&amp;family=Roboto%3Awght%40700\" rel=\"stylesheet\"\/><link href=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script.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>How to Write a Playwright Script<\/title><link rel=\"canonical\" href=\"https:\/\/www.testleaf.com\/blog\/?post_type=web-story&amp;p=8942\"\/><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=\"How to Write a Playwright Script\" poster-portrait-src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/cropped-How-to-write-a-playwright-script.jpg\"><amp-story-page id=\"38d2bca5-b098-47fa-b78a-c3cc64469a37\" 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:#f2c772\">\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-a6448329-2047-4bb2-b158-700c4eef234b\">\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\/02\/How-to-write-a-playwright-script.jpg\" alt=\"How to write a playwright script\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-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\/what-is-playwright-automation-testing-2026\/?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=\"674fceb2-6005-47c9-9b7d-3f57694a73d6\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-73645a92-ea1f-4f33-bc57-884ad2a11619 [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-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-d2965042-e16c-4433-821d-ea5542eae3be\",\"keyframes\":[{\"offset\":0,\"transform\":\"translate3d(0, -1723.64658%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.29,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.45,\"transform\":\"translate3d(0, -484.68941829600004%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.61,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.71,\"transform\":\"translate3d(0, -164.78061304800002%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.8,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.85,\"transform\":\"translate3d(0, -61.878912222000004%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.92,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.96,\"transform\":\"translate3d(0, -26.888886648%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":1,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"}],\"delay\":0,\"duration\":600,\"fill\":\"both\"}]<\/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:#dfdcdd\">\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-73645a92-ea1f-4f33-bc57-884ad2a11619\" 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-80c6667d-9d47-4b3a-8f76-7e2c2965bcf6\">\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\/02\/How-to-write-a-playwright-script-1.jpg\" alt=\"How to write a playwright script (1)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-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\">\n<div style=\"position:absolute;pointer-events:none;left:18.68932%;top:93.20388%;width:62.37864%;height:6.31068%;opacity:1\">\n<div id=\"anim-d2965042-e16c-4433-821d-ea5542eae3be\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0, -1723.64658%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.7782101167315175% 0.7782101167315175% 0.7782101167315175% 0.7782101167315175% \/ 5.128205128205128% 5.128205128205128% 5.128205128205128% 5.128205128205128%\" id=\"el-704baada-5864-4de3-9f58-2ce0e78556e1\">\n<h2 class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.1805690661478602% 0;font-family:&quot;Roboto&quot;,&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,sans-serif;font-size:0.533981em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700\">Start with intent<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"1a7f1b60-4728-47f9-aefa-134807ba0446\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-6db0a61d-0b0a-4cc1-8073-f54324eeb7e1 [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-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-e50372c6-751e-457c-a72f-41325b50c8bf\",\"keyframes\":[{\"offset\":0,\"transform\":\"translate3d(0, -1731.33894%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.29,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.45,\"transform\":\"translate3d(0, -486.852509928%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.61,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.71,\"transform\":\"translate3d(0, -165.516002664%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.8,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.85,\"transform\":\"translate3d(0, -62.155067946%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.92,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.96,\"transform\":\"translate3d(0, -27.008887464%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":1,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"}],\"delay\":0,\"duration\":600,\"fill\":\"both\"}]<\/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:#302c2d\">\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-6db0a61d-0b0a-4cc1-8073-f54324eeb7e1\" 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-85bc797c-f6c9-4ec3-94de-64ead641bc46\">\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\/02\/How-to-write-a-playwright-script-2.jpg\" alt=\"How to write a playwright script (2)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-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\">\n<div style=\"position:absolute;pointer-events:none;left:11.65049%;top:93.68932%;width:84.2233%;height:6.31068%;opacity:1\">\n<div id=\"anim-e50372c6-751e-457c-a72f-41325b50c8bf\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0, -1731.33894%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5763688760806917% 0.5763688760806917% 0.5763688760806917% 0.5763688760806917% \/ 5.128205128205128% 5.128205128205128% 5.128205128205128% 5.128205128205128%\" id=\"el-e37dc506-f3b9-4cd5-94b0-1a67a0de9d9e\">\n<h2 class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.13373559077809818% 0;font-family:&quot;Roboto&quot;,&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,sans-serif;font-size:0.533981em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700\">Pick resilient locators<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"e0c002cd-3762-459c-a8b2-d30dd2dea696\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-26e3bd30-b713-4376-9e64-2f00a9c10b80 [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-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-a1dcc919-773e-494a-80e7-c00d4a880294\",\"keyframes\":[{\"offset\":0,\"transform\":\"translate3d(0, -1705.69796%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.29,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.45,\"transform\":\"translate3d(0, -479.642266352%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.61,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.71,\"transform\":\"translate3d(0, -163.064724976%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.8,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.85,\"transform\":\"translate3d(0, -61.234556764000004%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.92,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.96,\"transform\":\"translate3d(0, -26.608888175999997%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":1,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"}],\"delay\":0,\"duration\":600,\"fill\":\"both\"}]<\/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:#805941\">\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-26e3bd30-b713-4376-9e64-2f00a9c10b80\" 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-c4890bcd-6885-433b-9147-1361d3fa6e08\">\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\/02\/How-to-write-a-playwright-script-3.jpg\" alt=\"How to write a playwright script (3)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-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\">\n<div style=\"position:absolute;pointer-events:none;left:18.93204%;top:92.0712%;width:84.2233%;height:6.31068%;opacity:1\">\n<div id=\"anim-a1dcc919-773e-494a-80e7-c00d4a880294\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0, -1705.69796%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.5763688760806917% 0.5763688760806917% 0.5763688760806917% 0.5763688760806917% \/ 5.128205128205128% 5.128205128205128% 5.128205128205128% 5.128205128205128%\" id=\"el-77fbe479-9ee0-4c0d-b3aa-faa4d063c59a\">\n<h2 class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.13373559077809818% 0;font-family:&quot;Roboto&quot;,&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,sans-serif;font-size:0.533981em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700\">Assert outcomes<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"a1eee4e9-e983-407f-93f8-61e6150c6d93\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-8d755a6f-690d-4d8c-8fc2-bc93facae21c [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-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-794d9fc4-fafd-486f-a67e-e6c0a748a20f\",\"keyframes\":[{\"offset\":0,\"transform\":\"translate3d(0, -1731.33894%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.29,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.45,\"transform\":\"translate3d(0, -486.852509928%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.61,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.71,\"transform\":\"translate3d(0, -165.516002664%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.8,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.85,\"transform\":\"translate3d(0, -62.155067946%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.92,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.96,\"transform\":\"translate3d(0, -27.008887464%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":1,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"}],\"delay\":0,\"duration\":600,\"fill\":\"both\"}]<\/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:#c2e4f2\">\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-8d755a6f-690d-4d8c-8fc2-bc93facae21c\" 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-c91b6fdc-8682-444b-885e-7e26e18b9d14\">\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\/02\/How-to-write-a-playwright-script-4.jpg\" alt=\"How to write a playwright script (4)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-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\">\n<div style=\"position:absolute;pointer-events:none;left:5.82524%;top:93.68932%;width:99.51456%;height:6.31068%;opacity:1\">\n<div id=\"anim-794d9fc4-fafd-486f-a67e-e6c0a748a20f\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0, -1731.33894%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.4878048780487805% 0.4878048780487805% 0.4878048780487805% 0.4878048780487805% \/ 5.128205128205128% 5.128205128205128% 5.128205128205128% 5.128205128205128%\" id=\"el-78059d02-2fde-41ca-b53f-2324f7d58535\">\n<h2 class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.11318597560975627% 0;font-family:&quot;Roboto&quot;,&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,sans-serif;font-size:0.533981em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700\">Make failures observable<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><amp-story-page id=\"74ba7499-c28d-48bd-8479-5883ede2dc7d\" auto-advance-after=\"7s\"><amp-story-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-f95abe5e-bed0-408e-a586-c55d300dc449 [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-animation layout=\"nodisplay\" trigger=\"visibility\"><script type=\"application\/json\">[{\"selector\":\"#anim-1cddc8de-2f84-4174-8911-d5b29d5b26d6\",\"keyframes\":[{\"offset\":0,\"transform\":\"translate3d(0, -1731.33894%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.29,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.45,\"transform\":\"translate3d(0, -486.852509928%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.61,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.71,\"transform\":\"translate3d(0, -165.516002664%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.8,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.85,\"transform\":\"translate3d(0, -62.155067946%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":0.92,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"},{\"offset\":0.96,\"transform\":\"translate3d(0, -27.008887464%, 0)\",\"easing\":\"cubic-bezier(.5, 0, 1, 1)\"},{\"offset\":1,\"transform\":\"translate3d(0, 0%, 0)\",\"easing\":\"cubic-bezier(0, 0, .5, 1)\"}],\"delay\":0,\"duration\":600,\"fill\":\"both\"}]<\/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:#f1f2f2\">\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-f95abe5e-bed0-408e-a586-c55d300dc449\" 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-e0ea0603-37e5-48c1-a84c-af36cf1bc568\">\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\/02\/How-to-write-a-playwright-script-5.jpg\" alt=\"How to write a playwright script (5)\" srcSet=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5.jpg 720w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-576x1024.jpg 576w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-169x300.jpg 169w,https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-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\">\n<div style=\"position:absolute;pointer-events:none;left:13.1068%;top:93.68932%;width:99.51456%;height:6.31068%;opacity:1\">\n<div id=\"anim-1cddc8de-2f84-4174-8911-d5b29d5b26d6\" class=\"animation-wrapper\" style=\"width:100%;height:100%;display:block;position:absolute;top:0;left:0;--initial-opacity:1;--initial-transform:translate3d(0, -1731.33894%, 0)\">\n<div style=\"pointer-events:initial;width:100%;height:100%;display:block;position:absolute;top:0;left:0;z-index:0;border-radius:0.4878048780487805% 0.4878048780487805% 0.4878048780487805% 0.4878048780487805% \/ 5.128205128205128% 5.128205128205128% 5.128205128205128% 5.128205128205128%\" id=\"el-cfedfff5-4385-4ab4-8a83-8a010b41eac6\">\n<h2 class=\"fill text-wrapper\" style=\"white-space:pre-line;overflow-wrap:break-word;word-break:break-word;margin:-0.11318597560975627% 0;font-family:&quot;Roboto&quot;,&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,sans-serif;font-size:0.533981em;line-height:1.2;text-align:left;padding:0;color:#000000\"><span><span style=\"font-weight: 700\">Keep tests isolated<\/span><\/span><\/h2>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><\/amp-story-grid-layer><\/amp-story-page><\/amp-story><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Write stable Playwright scripts with intent-first tests, role\/label locators, outcome-based assertions, trace + screenshots for debugging, and isolated runs\u2014so CI stays fast and flake-free.<\/p>\n","protected":false},"author":1,"featured_media":8949,"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-8942","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":"a6448329-2047-4bb2-b158-700c4eef234b","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"How-to-write-a-playwright-script-169x300.jpg","width":169,"height":300,"filesize":13243,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-169x300.jpg"},"large":{"file":"How-to-write-a-playwright-script-576x1024.jpg","width":576,"height":1024,"filesize":65234,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-576x1024.jpg"},"thumbnail":{"file":"How-to-write-a-playwright-script-150x150.jpg","width":150,"height":150,"filesize":7718,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"How-to-write-a-playwright-script-150x150.jpg","width":150,"height":150,"filesize":7718,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-150x150.jpg"},"rpg_gallery_thumb":{"file":"How-to-write-a-playwright-script-150x150.jpg","width":150,"height":150,"filesize":7718,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-150x150.jpg"},"web-stories-poster-portrait":{"file":"How-to-write-a-playwright-script-640x853.jpg","width":640,"height":853,"filesize":64892,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-640x853.jpg"},"web-stories-publisher-logo":{"file":"How-to-write-a-playwright-script-96x96.jpg","width":96,"height":96,"filesize":4195,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-96x96.jpg"},"web-stories-thumbnail":{"file":"How-to-write-a-playwright-script-150x267.jpg","width":150,"height":267,"filesize":11326,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-150x267.jpg"},"full":{"file":"How-to-write-a-playwright-script.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#f2c772","blurHash":"UDN9K?nhMttS04WX9}n~0Jbc?dRPySad]~W?","creationDate":"2026-02-03T06:01:38","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script.jpg","id":8948,"alt":"How to write a playwright script","local":false,"provider":"local"}}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"id":"38d2bca5-b098-47fa-b78a-c3cc64469a37","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":"9ecce197-3674-4089-9a00-913cf0143793"},"animations":[],"pageAttachment":{"url":"https:\/\/www.testleaf.com\/blog\/what-is-playwright-automation-testing-2026\/?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":"80c6667d-9d47-4b3a-8f76-7e2c2965bcf6","scale":100,"focalX":50,"focalY":50,"resource":{"type":"image","mimeType":"image\/jpeg","width":720,"height":1280,"sizes":{"medium":{"file":"How-to-write-a-playwright-script-1-169x300.jpg","width":169,"height":300,"filesize":9619,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-169x300.jpg"},"large":{"file":"How-to-write-a-playwright-script-1-576x1024.jpg","width":576,"height":1024,"filesize":44651,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-576x1024.jpg"},"thumbnail":{"file":"How-to-write-a-playwright-script-1-150x150.jpg","width":150,"height":150,"filesize":6343,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"How-to-write-a-playwright-script-1-150x150.jpg","width":150,"height":150,"filesize":6343,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-150x150.jpg"},"rpg_gallery_thumb":{"file":"How-to-write-a-playwright-script-1-150x150.jpg","width":150,"height":150,"filesize":6343,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-150x150.jpg"},"web-stories-poster-portrait":{"file":"How-to-write-a-playwright-script-1-640x853.jpg","width":640,"height":853,"filesize":48932,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-640x853.jpg"},"web-stories-publisher-logo":{"file":"How-to-write-a-playwright-script-1-96x96.jpg","width":96,"height":96,"filesize":3411,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-96x96.jpg"},"web-stories-thumbnail":{"file":"How-to-write-a-playwright-script-1-150x267.jpg","width":150,"height":267,"filesize":7979,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1-150x267.jpg"},"full":{"file":"How-to-write-a-playwright-script-1.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#dfdcdd","blurHash":"UDRp8.DOIBxtR+oyI:n$~q%g%MozsARP%1o#","creationDate":"2026-02-03T06:01:35","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-1.jpg","id":8943,"alt":"How to write a playwright script (1)","local":false,"provider":"local"}},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":33,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700\">Start with intent<\/span>","x":77,"y":576,"width":257,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"type":"text","height":39,"id":"704baada-5864-4de3-9f58-2ce0e78556e1"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"id":"674fceb2-6005-47c9-9b7d-3f57694a73d6","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":"08a9a232-9058-4474-95f1-74ef9b2605e9"},"animations":[{"id":"f1330db5-d2ff-467a-9631-63b613434096","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["80c6667d-9d47-4b3a-8f76-7e2c2965bcf6"]},{"id":"86fba582-4b23-4643-a753-539de079d2d1","type":"effect-drop","duration":600,"delay":0,"targets":["704baada-5864-4de3-9f58-2ce0e78556e1"]}]},{"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":"How-to-write-a-playwright-script-2-169x300.jpg","width":169,"height":300,"filesize":6590,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-169x300.jpg"},"large":{"file":"How-to-write-a-playwright-script-2-576x1024.jpg","width":576,"height":1024,"filesize":28754,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-576x1024.jpg"},"thumbnail":{"file":"How-to-write-a-playwright-script-2-150x150.jpg","width":150,"height":150,"filesize":4187,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"How-to-write-a-playwright-script-2-150x150.jpg","width":150,"height":150,"filesize":4187,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-150x150.jpg"},"rpg_gallery_thumb":{"file":"How-to-write-a-playwright-script-2-150x150.jpg","width":150,"height":150,"filesize":4187,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-150x150.jpg"},"web-stories-poster-portrait":{"file":"How-to-write-a-playwright-script-2-640x853.jpg","width":640,"height":853,"filesize":29679,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-640x853.jpg"},"web-stories-publisher-logo":{"file":"How-to-write-a-playwright-script-2-96x96.jpg","width":96,"height":96,"filesize":2575,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-96x96.jpg"},"web-stories-thumbnail":{"file":"How-to-write-a-playwright-script-2-150x267.jpg","width":150,"height":267,"filesize":5862,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2-150x267.jpg"},"full":{"file":"How-to-write-a-playwright-script-2.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#302c2d","blurHash":"URQvze-._20MISNIf-s*~pIVE2?G%ioaV=Wa","creationDate":"2026-02-03T06:01:36","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-2.jpg","id":8944,"alt":"How to write a playwright script (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":"85bc797c-f6c9-4ec3-94de-64ead641bc46","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":33,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700\">Pick resilient locators<\/span>","x":48,"y":579,"width":347,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"height":39,"id":"e37dc506-f3b9-4cd5-94b0-1a67a0de9d9e","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"1426ab5e-f46c-4958-94fb-b16cd3fae6ec","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["85bc797c-f6c9-4ec3-94de-64ead641bc46"]},{"id":"c14ca7ed-3235-49b1-b36f-dbae165d854f","type":"effect-drop","duration":600,"delay":0,"targets":["e37dc506-f3b9-4cd5-94b0-1a67a0de9d9e"]}],"id":"1a7f1b60-4728-47f9-aefa-134807ba0446","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":"08a9a232-9058-4474-95f1-74ef9b2605e9"}},{"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":"How-to-write-a-playwright-script-3-169x300.jpg","width":169,"height":300,"filesize":9750,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-169x300.jpg"},"large":{"file":"How-to-write-a-playwright-script-3-576x1024.jpg","width":576,"height":1024,"filesize":42842,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-576x1024.jpg"},"thumbnail":{"file":"How-to-write-a-playwright-script-3-150x150.jpg","width":150,"height":150,"filesize":6358,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"How-to-write-a-playwright-script-3-150x150.jpg","width":150,"height":150,"filesize":6358,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-150x150.jpg"},"rpg_gallery_thumb":{"file":"How-to-write-a-playwright-script-3-150x150.jpg","width":150,"height":150,"filesize":6358,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-150x150.jpg"},"web-stories-poster-portrait":{"file":"How-to-write-a-playwright-script-3-640x853.jpg","width":640,"height":853,"filesize":45709,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-640x853.jpg"},"web-stories-publisher-logo":{"file":"How-to-write-a-playwright-script-3-96x96.jpg","width":96,"height":96,"filesize":3698,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-96x96.jpg"},"web-stories-thumbnail":{"file":"How-to-write-a-playwright-script-3-150x267.jpg","width":150,"height":267,"filesize":8310,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3-150x267.jpg"},"full":{"file":"How-to-write-a-playwright-script-3.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#805941","blurHash":"UsPi*QtSkVRjt7Rjofn$?wM_aexuNIxZV@WX","creationDate":"2026-02-03T06:01:36","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-3.jpg","id":8945,"alt":"How to write a playwright script (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":"c4890bcd-6885-433b-9147-1361d3fa6e08","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":33,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700\">Assert outcomes<\/span>","x":78,"y":569,"width":347,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"height":39,"id":"77fbe479-9ee0-4c0d-b3aa-faa4d063c59a","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"aa311285-2fd4-412e-9928-f2fc655cc00d","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["c4890bcd-6885-433b-9147-1361d3fa6e08"]},{"id":"31924b21-d87a-40d6-acbc-840e7fd6c4db","type":"effect-drop","duration":600,"delay":0,"targets":["77fbe479-9ee0-4c0d-b3aa-faa4d063c59a"]}],"id":"e0c002cd-3762-459c-a8b2-d30dd2dea696","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":"08a9a232-9058-4474-95f1-74ef9b2605e9"}},{"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":"How-to-write-a-playwright-script-4-169x300.jpg","width":169,"height":300,"filesize":9237,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-169x300.jpg"},"large":{"file":"How-to-write-a-playwright-script-4-576x1024.jpg","width":576,"height":1024,"filesize":47571,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-576x1024.jpg"},"thumbnail":{"file":"How-to-write-a-playwright-script-4-150x150.jpg","width":150,"height":150,"filesize":5278,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"How-to-write-a-playwright-script-4-150x150.jpg","width":150,"height":150,"filesize":5278,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-150x150.jpg"},"rpg_gallery_thumb":{"file":"How-to-write-a-playwright-script-4-150x150.jpg","width":150,"height":150,"filesize":5278,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-150x150.jpg"},"web-stories-poster-portrait":{"file":"How-to-write-a-playwright-script-4-640x853.jpg","width":640,"height":853,"filesize":47624,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-640x853.jpg"},"web-stories-publisher-logo":{"file":"How-to-write-a-playwright-script-4-96x96.jpg","width":96,"height":96,"filesize":2895,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-96x96.jpg"},"web-stories-thumbnail":{"file":"How-to-write-a-playwright-script-4-150x267.jpg","width":150,"height":267,"filesize":7684,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4-150x267.jpg"},"full":{"file":"How-to-write-a-playwright-script-4.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#c2e4f2","blurHash":"UKL$9+M}ysouyWs,RPXA~WkWVXnO01Rlxung","creationDate":"2026-02-03T06:01:37","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-4.jpg","id":8946,"alt":"How to write a playwright script (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":"c91b6fdc-8682-444b-885e-7e26e18b9d14","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":33,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700\">Make failures observable<\/span>","x":24,"y":579,"width":410,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"height":39,"id":"78059d02-2fde-41ca-b53f-2324f7d58535","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"436f9860-23b8-492f-8c68-6a9cc3e11899","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["c91b6fdc-8682-444b-885e-7e26e18b9d14"]},{"id":"dc4a8119-28a2-4758-83ce-af52136cd7f7","type":"effect-drop","duration":600,"delay":0,"targets":["78059d02-2fde-41ca-b53f-2324f7d58535"]}],"id":"a1eee4e9-e983-407f-93f8-61e6150c6d93","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":"08a9a232-9058-4474-95f1-74ef9b2605e9"}},{"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":"How-to-write-a-playwright-script-5-169x300.jpg","width":169,"height":300,"filesize":7780,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-169x300.jpg"},"large":{"file":"How-to-write-a-playwright-script-5-576x1024.jpg","width":576,"height":1024,"filesize":36055,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-576x1024.jpg"},"thumbnail":{"file":"How-to-write-a-playwright-script-5-150x150.jpg","width":150,"height":150,"filesize":5796,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-150x150.jpg"},"rpg_gallery_admin_thumb":{"file":"How-to-write-a-playwright-script-5-150x150.jpg","width":150,"height":150,"filesize":5796,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-150x150.jpg"},"rpg_gallery_thumb":{"file":"How-to-write-a-playwright-script-5-150x150.jpg","width":150,"height":150,"filesize":5796,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-150x150.jpg"},"web-stories-poster-portrait":{"file":"How-to-write-a-playwright-script-5-640x853.jpg","width":640,"height":853,"filesize":39059,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-640x853.jpg"},"web-stories-publisher-logo":{"file":"How-to-write-a-playwright-script-5-96x96.jpg","width":96,"height":96,"filesize":3331,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-96x96.jpg"},"web-stories-thumbnail":{"file":"How-to-write-a-playwright-script-5-150x267.jpg","width":150,"height":267,"filesize":6631,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5-150x267.jpg"},"full":{"file":"How-to-write-a-playwright-script-5.jpg","width":720,"height":1280,"mimeType":"image\/jpeg","sourceUrl":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5.jpg"}},"isPlaceholder":false,"isExternal":false,"needsProxy":false,"baseColor":"#f1f2f2","blurHash":"USR3NGMK9EnhnOV@s.j?_Ntk.8S#J6o}Nba}","creationDate":"2026-02-03T06:01:37","src":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/How-to-write-a-playwright-script-5.jpg","id":8947,"alt":"How to write a playwright script (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":"e0ea0603-37e5-48c1-a84c-af36cf1bc568","type":"image"},{"opacity":100,"flip":{"vertical":false,"horizontal":false},"rotationAngle":0,"lockAspectRatio":true,"backgroundTextMode":"NONE","font":{"family":"Roboto"},"fontSize":33,"backgroundColor":{"color":{"r":196,"g":196,"b":196}},"lineHeight":1.2,"textAlign":"left","padding":{"locked":true,"hasHiddenPadding":false,"horizontal":0,"vertical":0},"content":"<span style=\"font-weight: 700\">Keep tests isolated<\/span>","x":54,"y":579,"width":410,"borderRadius":{"locked":true,"topLeft":2,"topRight":2,"bottomRight":2,"bottomLeft":2},"height":39,"id":"cfedfff5-4385-4ab4-8a83-8a010b41eac6","type":"text"}],"backgroundColor":{"color":{"r":255,"g":255,"b":255}},"animations":[{"id":"5e61b793-3ff1-4be7-818d-16498f653eb1","type":"effect-background-zoom","zoomDirection":"scaleOut","duration":2000,"delay":0,"targets":["e0ea0603-37e5-48c1-a84c-af36cf1bc568"]},{"id":"0293619a-75b9-4318-ad66-e970d97e0b2c","type":"effect-drop","duration":600,"delay":0,"targets":["cfedfff5-4385-4ab4-8a83-8a010b41eac6"]}],"id":"74ba7499-c28d-48bd-8479-5883ede2dc7d","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":"08a9a232-9058-4474-95f1-74ef9b2605e9"}}],"fonts":{"Roboto":{"family":"Roboto","weights":[100,300,400,500,700,900],"styles":["italic","regular"],"variants":[[0,100],[1,100],[0,300],[1,300],[0,400],[1,400],[0,500],[1,500],[0,700],[1,700],[0,900],[1,900]],"fallbacks":["Helvetica Neue","Helvetica","sans-serif"],"service":"fonts.google.com","metrics":{"upm":2048,"asc":1900,"des":-500,"tAsc":1536,"tDes":-512,"tLGap":102,"wAsc":1946,"wDes":512,"xH":1082,"capH":1456,"yMin":-555,"yMax":2163,"hAsc":1900,"hDes":-500,"lGap":0}}},"autoAdvance":true,"defaultPageDuration":7,"currentStoryStyles":{"colors":[]}},"story_poster":{"id":8949,"url":"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/02\/cropped-How-to-write-a-playwright-script.jpg","width":640,"height":853,"needsProxy":false},"_links":{"self":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story\/8942","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\/8942\/revisions"}],"predecessor-version":[{"id":8951,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story\/8942\/revisions\/8951"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/media\/8949"}],"wp:attachment":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/media?parent=8942"}],"wp:term":[{"taxonomy":"web_story_category","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web_story_category?post=8942"},{"taxonomy":"web_story_tag","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web_story_tag?post=8942"}],"wp:lock":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/web-stories\/v1\/web-story\/8942\/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}]}}