{"id":2418,"date":"2023-06-29T09:13:05","date_gmt":"2023-06-29T09:13:05","guid":{"rendered":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/2023\/06\/29\/playwright-interview-questions\/"},"modified":"2023-06-29T09:13:05","modified_gmt":"2023-06-29T09:13:05","slug":"playwright-interview-questions","status":"publish","type":"post","link":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/2023\/06\/29\/playwright-interview-questions\/","title":{"rendered":"Playwright Interview Questions"},"content":{"rendered":"<p><html><body><\/p>\n<section class=\"tcb-post-content tcb-shortcode thrv_wrapper\" data-css=\"tve-u-16ec5d248bb\">\n<div class=\"tve_flt tcb-style-wrap\" id=\"tve_flt\">\n<div class=\"tve_shortcode_editor tar-main-content\" data-post-id=\"2418\" id=\"tve_editor\">\n<div class=\"thrv_wrapper tve-toc tve-elem-scroll tve-toc-expandable tcb-local-vars-root\" data-animation=\"slide\" data-animation-speed=\"fast\" data-bullet-style='{\"0\":\"tve-u-649d3a2b8cf7d2\",\"1\":\"tve-u-649d3a2b8cf7e5\",\"2\":\"tve-u-649d3a2b8cf803\"}' data-columns=\"1\" data-columns-d=\"1\" data-css=\"tve-u-649d3a2b8cf7c2\" data-ct=\"toc-60671\" data-ct-name=\"Table of Contents 03\" data-element-name=\"Table of Contents\" data-headers=\"h1,h3,h5\" data-heading-style='{\"0\":\"tve-u-649d3a2b8cf6c5\",\"1\":\"tve-u-649d3a2b8cf792\",\"2\":\"tve-u-649d3a2b8cf7a6\"}' data-highlight=\"section\" data-id=\"ljgxeazp\" data-number-style='{\"0\":\"tve-u-649d3a2b8cf815\",\"1\":\"tve-u-649d3a2b8cf825\",\"2\":\"tve-u-649d3a2b8cf840\"}' data-numbering=\"basic\" data-state-default=\"expanded\" data-state-default-m=\"collapsed\" data-transition=\"fade\" style=\"\">\n<div class=\"thrive-colors-palette-config\" style=\"display: none !important\"><\/div>\n<div class=\"tve-toc-divider\" style=\"position: absolute; width: 0; height: 0; overflow: hidden;\">\n<div class=\"thrv_wrapper thrv-divider tve-vert-divider\" data-color-d=\"rgba(0, 0, 0, 0)\" data-css=\"tve-u-649d3a2b8cf851\" data-style=\"tve_sep-1\" data-thickness-d=\"1\">\n<hr class=\"tve_sep tve_sep-1\" style=\"\"\/><\/div>\n<\/div>\n<p><svg class=\"toc-icons\" style=\"position: absolute; width: 0; height: 0; overflow: hidden;\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><symbol data-id=\"icon-circle-outlined\" id=\"toc-bullet-0-ljgxeazp\" viewbox=\"0 0 512 512\"><path d=\"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z\"><\/path><\/symbol><symbol data-id=\"icon-circle-outlined\" id=\"toc-bullet-1-ljgxeazp\" viewbox=\"0 0 512 512\"><path d=\"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z\"><\/path><\/symbol><symbol data-id=\"icon-circle-outlined\" id=\"toc-bullet-2-ljgxeazp\" viewbox=\"0 0 512 512\"><path d=\"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z\"><\/path><\/symbol><\/svg><\/p>\n<div class=\"tve-content-box-background\" data-css=\"tve-u-649d3a2b8cf874\" style=\"\"><\/div>\n<div class=\"thrv_wrapper tve-toc-title show-icon tcb-icon-display tve-no-dropzone tve-prevent-content-edit tve-no-drop-inside\" data-css=\"tve-u-649d3a2b8cf887\" style=\"\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb\" style=\"\">\n<div class=\"tve-toc-title-icon\" data-icon-code=\"icon-arrow-circle-down-solid\" style=\"\"><svg class=\"tcb-icon\" data-id=\"icon-arrow-circle-down-solid\" data-name=\"\" viewbox=\"0 0 512 512\"><path d=\"M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-143.6-28.9L288 302.6V120c0-13.3-10.7-24-24-24h-16c-13.3 0-24 10.7-24 24v182.6l-72.4-75.5c-9.3-9.7-24.8-9.9-34.3-.4l-10.9 11c-9.4 9.4-9.4 24.6 0 33.9L239 404.3c9.4 9.4 24.6 9.4 33.9 0l132.7-132.7c9.4-9.4 9.4-24.6 0-33.9l-10.9-11c-9.5-9.5-25-9.3-34.3.4z\"><\/path><\/svg><\/div>\n<div class=\"thrv_wrapper thrv_text_element tve_no_icons\">\n<div class=\"tcb-plain-text\" style=\"\">Table of Contents<\/div>\n<\/p><\/div>\n<\/div>\n<\/div>\n<div class=\"tve-cb tve-toc-content tve-prevent-content-edit\">\n<div class=\"thrv_wrapper tve-toc-list tcb-no-delete tcb-no-save tcb-no-clone tve-no-dropzone\" data-css=\"tve-u-649d3a2b8cf899\" style=\"\">\n<div class=\"tve-content-box-background\"><\/div>\n<div class=\"tve-cb\" style=\"\">\n<div class=\"tve_ct_content tve_clearfix\" style=\"\">\n<div class=\"ct_column\">\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939482\" jump-animation=\"smooth\">\u00a01.\u00a0What is Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939483\" jump-animation=\"smooth\">2. What is the difference between Selenium and Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674509\" jump-animation=\"smooth\">3.What are the advantages of a Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939485\" jump-animation=\"smooth\">4. Name some disadvantages of Playwright.<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939486\" jump-animation=\"smooth\">5. What are the different testing types the Playwright supports?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939487\" jump-animation=\"smooth\">6. What are the programming languages that the playwright supports<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939488\" jump-animation=\"smooth\">7. Briefly describe the commands that are used for Playwright installation and Execution of tests<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939489\" jump-animation=\"smooth\">8. What is a Configuration File in Playwright explain?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1642525980189\" jump-animation=\"smooth\">9. What is @playwright\/test package in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939491\" jump-animation=\"smooth\">10. What is Page class in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939492\" jump-animation=\"smooth\">11. How to navigate to specific URLs in Playwright explain with sample tests<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939493\" jump-animation=\"smooth\">12. What are the different types of reporters that the playwright supports?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939494\" jump-animation=\"smooth\">13. What are the locators in the Playwright list of any five<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939495\" jump-animation=\"smooth\">14. What are the different types of text selectors available in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939496\" jump-animation=\"smooth\">15. How to use assertions in Playwright? List any 5<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939498\" jump-animation=\"smooth\">16. What are soft assertions in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939499\" jump-animation=\"smooth\">17. How to negate the Matchers\/Assertions in Playwright? Or How can I verify not conditions in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939500\" jump-animation=\"smooth\">18. Does Playwright support XPath? If so how can I use them in the test?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939501\" jump-animation=\"smooth\">19. What are command line options in the Playwright? Explain 5 helpful options<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939502\" jump-animation=\"smooth\">20. Some of the Important command line options<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939503\" jump-animation=\"smooth\">21. What is headed and headless mode in Playwright<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939504\" jump-animation=\"smooth\">22. Does Playwright support HTML reporters? How to Generate HTML reports in Playwright? \u00a0<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939505\" jump-animation=\"smooth\">23. What are timeouts in Playwright? What are the different types of Timeouts available in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1638970939506\" jump-animation=\"smooth\">24. How to navigate forward and backward in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1641829942311\" jump-animation=\"smooth\">25. How to perform actions using the Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1642513700419\" jump-animation=\"smooth\">26. Does playwright support the safari browser if so can we execute the test on safari?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1641829942312\" jump-animation=\"smooth\">27. How to wait for a specific element in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674510\" jump-animation=\"smooth\">28. What is browser context?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674511\" jump-animation=\"smooth\">29. How to open multiple windows in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674512\" jump-animation=\"smooth\">30. How to handle iFrame in PLaywright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674513\" jump-animation=\"smooth\">31. Explain some of the click and double click actions with its options.<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674514\" jump-animation=\"smooth\">32. How to perform a right-click on Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674515\" jump-animation=\"smooth\">33. How to evaluate Javascript in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674516\" jump-animation=\"smooth\">34. What are Playwright fixtures?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674517\" jump-animation=\"smooth\">35. What is CodeGen in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674518\" jump-animation=\"smooth\">36. How to parameterize tests in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674519\" jump-animation=\"smooth\">37. Write a code to upload the file<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674520\" jump-animation=\"smooth\">38. Write a code to download the file<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674521\" jump-animation=\"smooth\">39. How to perform drag and drop in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674522\" jump-animation=\"smooth\">40. How to handle browser popups or dialogs?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674523\" jump-animation=\"smooth\">41. What is testInfo Object?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674524\" jump-animation=\"smooth\">42. What is testError Object?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674525\" jump-animation=\"smooth\">43. What is global setup and tear down explain?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674526\" jump-animation=\"smooth\">44. How to capture Network logs in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674527\" jump-animation=\"smooth\">45. How to capture screenshots in PLaywright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674528\" jump-animation=\"smooth\">46. Does Playwright support API testing? If so how can we perform API testing?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674529\" jump-animation=\"smooth\">47. What is Visual Testing? Why do we need it?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674530\" jump-animation=\"smooth\">48. Write a simple code to Test Visually<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674531\" jump-animation=\"smooth\">49. How to configure multiple reporters in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674532\" jump-animation=\"smooth\">50. What is the serial mode in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674533\" jump-animation=\"smooth\">51. How to perform parallel execution in PLaywright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674534\" jump-animation=\"smooth\">52. How to perform mobile device emulation in Playwright?<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674535\" jump-animation=\"smooth\">53. Mention some of the helpful ways to debug Playwright tests.<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674536\" jump-animation=\"smooth\">54. What is actionability in Playwright? Explain in detail<\/a><\/div>\n<div class=\"thrv_wrapper tve-toc-heading tve-toc-heading-level1 tve_no_icons\" data-css=\"tve-u-649d3a2b8cf792\" data-element-name=\"Heading Level 2\" data-tag=\"H3\"><a class=\"tve-toc-anchor tve-jump-scroll\" href=\"#t-1688025674537\" jump-animation=\"smooth\">55. Mention some of the advantages of Playwright compared to Cypress<\/a><\/div>\n<\/div>\n<div class=\"thrv_wrapper thrv-divider tve-vert-divider\" data-color-d=\"rgba(0, 0, 0, 0)\" data-css=\"tve-u-649d3a2b8cf851\" data-style=\"tve_sep-1\" data-thickness-d=\"1\">\n<hr class=\"tve_sep tve_sep-1\" style=\"\"\/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\">\n<h3 class=\"\" id=\"t-1638970939482\"><b>\u00a01.\u00a0<\/b>What is Playwright?<\/h3>\n<p>Playwright is an open-source testing tool, which supports functional, API, and component testing. The playwright is managed by Microsoft.<\/p>\n<div class=\"code-block code-block-2\" style=\"margin: 8px auto; text-align: center; display: block; clear: both;\">\n<p><!-- horizontal responsive 2 --><br \/>\n<ins class=\"adsbygoogle\" data-ad-client=\"ca-pub-3231318496783163\" data-ad-format=\"auto\" data-ad-slot=\"2788468763\" data-full-width-responsive=\"true\" style=\"display:block\"><\/ins>\n<\/div>\n<h3 class=\"\" id=\"t-1638970939483\"><b>2. <\/b>What is the difference between Selenium and Playwright?<\/h3>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"263\">\n<p>The playwright is ready to use a framework one can install and start using.<\/p>\n<\/td>\n<td valign=\"top\" width=\"247\">\n<p>Selenium Provides API\/Libraries you need to build the framework<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"263\">\n<p>Playwright shipped with in-built assertion libraries<\/p>\n<\/td>\n<td valign=\"top\" width=\"247\">\n<p>Selenium doesn&#8217;t provide any assertions, we need to integrate using JUnit or TestNG<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"263\">\n<p>The playwright uses the WebSocket connection to communicate with the browser<\/p>\n<\/td>\n<td valign=\"top\" width=\"247\">\n<p>Selenium uses the Webdriver API\/HTTP to communicate with the browser<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"263\">\n<p>The playwright is faster compared to Selenium<\/p>\n<\/td>\n<td valign=\"top\" width=\"247\">\n<p>Selenium comparatively slower<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"263\">\n<p>The playwright doesn&#8217;t support the safari stock browser rather it uses the open-source, Webkit browser to test safari<\/p>\n<\/td>\n<td valign=\"top\" width=\"247\">\n<p>Selenium supports Safari<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"263\">\n<p>Playwright officially supports Java, Python, .NET C#, TypeScript, and JavaScript.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<\/td>\n<td valign=\"top\" width=\"247\">\n<p>Selenium officially supports Java, Python, C#, Ruby, Perl, PHP, and JavaScript<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 class=\"\" id=\"t-1688025674509\"><b>3.<\/b>What are the advantages of a Playwright?<\/h3>\n<p>Compared to any other framework Playwright has a lot of advantages, as it is a modern solution it&#8217;s built on top of the limitation of another framework<\/p>\n<ul>\n<li>The playwright is easy to install and learn<\/li>\n<li>Playwright supports Java, Python, .NET C#, TypeScript, and JavaScript.<\/li>\n<li>It supports both API and end-to-end testing<\/li>\n<li>Playwright supports Chromium-based browsers, Firefox, Safari(Webkit)<\/li>\n<li>As Playwright doesn&#8217;t use the webdriver API the execution is comparatively faster<\/li>\n<li>Playwright automatically waits before making any actions where a user doesn&#8217;t have to provide implicit or explicit waits<\/li>\n<li>Playwright allows Network traffic control. Mocks etc.<\/li>\n<li>Edge case scenarios like File upload and download can be handled easily in playwright<\/li>\n<\/ul>\n<p><b> <\/b><\/p>\n<h3 class=\"\" id=\"t-1638970939485\"><b>4. <\/b>Name some disadvantages of Playwright.<\/h3>\n<li>Playwright doesn&#8217;t support Mobile automation (They might introduce it in the future)<\/li>\n<li>Playwright doesn&#8217;t support legacy IE Automation<\/li>\n<li>Playwright doesn\u2019t support Safari stock browser<\/li>\n<li>Some of the build tools like Teamcity is not directly support<\/li>\n<li>Some of the features like Ordering, Priority, and Dependancy tests which are available in TestNG are not available in Playwright yet.<\/li>\n<\/div>\n<div class=\"thrv_wrapper thrv_text_element\" data-css=\"tve-u-649d3a2b8cf8b7\" style=\"\">\n<h3 class=\"\" id=\"t-1638970939486\"><b>5. <\/b>What are the different testing types the Playwright supports?<\/h3>\n<p>Playwright supports functional testing, \u00a0API testing, and Component level testing.<\/p>\n<h3 class=\"\" id=\"t-1638970939487\">6. What are the programming languages that the playwright supports<\/h3>\n<p>Playwright supports Java, Python, .NET C#, TypeScript, and JavaScript. However, the Typescript\/Javascript version of Playwright is more stable and most used.<\/p>\n<h3 class=\"\" id=\"t-1638970939488\"><b>7. <\/b>Briefly describe the commands that are used for Playwright installation and Execution of tests<\/h3>\n<p>As Playwright supports many programming languages each programming language follows its own installation process.<\/p>\n<p>In this context we are using the Playwright and Javascript we need to use the following commands<\/p>\n<p>Before installation, we need to ensure that NodeJS binaries are installed in our machine and then we can use<\/p>\n<p>npm init playwright@latest<\/p>\n<p>The above command will install the required packages and configurations. Once done we are ready to write the test cases.<\/p>\n<p>npx playwright test<\/p>\n<p>The command is used for executing playwright tests. By default, the playwright executes all the tests that are available for the project.<b> <\/b><\/p>\n<h3 class=\"\" id=\"t-1638970939489\"><b>8. <\/b>What is a Configuration File in Playwright explain?<\/h3>\n<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"112\">\n<p>As the name indicates the configuration file is the place where we configure the execution behavior of the playwright. The configuration file is typically named playwright.config.ts(\/js).<\/p>\n<p>Using the configuration file we can configure headless mode, fullscreen, screenshot options, baseURL, browser options, etc.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 class=\"\" id=\"t-1642525980189\"><b>9. <\/b>What is @playwright\/test package in Playwright?<\/h3>\n<p>The Playwright can be used with different test runners such as Mocha, Jasmine, Jest, etc. Similar way playwright has its own test runner called the playwright test. The playwright test is the default test runner for the playwright.<\/p>\n<p><b> <\/b><\/p>\n<h3 class=\"\" id=\"t-1638970939491\"><b>10. <\/b>What is Page class in Playwright?<\/h3>\n<p>The Page class in playwright is the main class, which provides the methods to interact with the browser. It also provides a set of event handlers that helps to execute a set of actions as soon as the event triggers.<\/p>\n<h3 class=\"\" id=\"t-1638970939492\"><b>11. <\/b>How to navigate to specific URLs in Playwright explain with sample tests<\/h3>\n<p>const { test, expect } = require(&#8220;@playwright\/test&#8221;);<\/p>\n<p>test.describe(&#8220;navigation&#8221;, () =&gt; {<\/p>\n<p>\u00a0 test(&#8220;navigation&#8221;, async ({ page }) =&gt; {<\/p>\n<p>\u00a0\u00a0\u00a0 await page.goto(&#8220;https:\/\/playwright.dev\/&#8221;);<\/p>\n<p>\u00a0 });<\/p>\n<p>});<\/p>\n<p>The <strong>page.goto()<\/strong> is used for navigating to a specific URL.<\/p>\n<p>The <strong>test.describe()<\/strong> hook is used for grouping the set of tests<\/p>\n<p>The <strong>test()<\/strong> contains actual tests with playwright commands.<\/p>\n<h3 class=\"\" id=\"t-1638970939493\"><b>12. <\/b>What are the different types of reporters that the playwright supports?<\/h3>\n<p>The playwright supports different types of reports<\/p>\n<ul>\n<li>Dot reporter<\/li>\n<li>Line reporter<\/li>\n<li>HTML reporter<\/li>\n<li>JSON reporter<\/li>\n<li>JUnit reporter<\/li>\n<li>Custom reporter<\/li>\n<\/ul>\n<p>In addition to the above playwright also supports allure reporters using third-party plugins.<\/p>\n<h3 class=\"\" id=\"t-1638970939494\"><b>13. <\/b>What are the locators in the Playwright list of any five<\/h3>\n<p>Locators help to find the elements on the page uniquely at any point in time.<\/p>\n<p>The page class provides the locator function.<\/p>\n<ul>\n<li>page.getByText() : Find the element that matches the given text<\/li>\n<li>page.getByRole(): Find the element that matches the role attribute<\/li>\n<li>page.getByLabel(): Find the element that matches the label<\/li>\n<li>page.getByTestId(): Find the element that matches the data-testid attribute<\/li>\n<li>page.getByTitle(): Find the element that matches the title attribute<\/li>\n<li>page.locator(&lt;css&gt; or &lt;xpath&gt;): Find the element by using the CSS or XPath<\/li>\n<\/ul>\n<h3 class=\"\" id=\"t-1638970939495\"><b>14. <\/b>What are the different types of text selectors available in Playwright?<\/h3>\n<p>Text-based locators in Playwright are a unique feature, that helps to locate the element which is having specific text<\/p>\n<p><strong>locator.(&lt;some_text) :<\/strong> Matches the element that has passed text<\/p>\n<p>\u00a0Ex: await page.locator(&#8216;text=Home menu&#8217;)<\/p>\n<p><strong>:text-is():<\/strong> this can be used inside the CSS selector, which will perform the exact match before finding the elements<\/p>\n<p>Ex: await page.locator(&#8216;#nav-bar :text-is(&#8220;Home&#8221;)&#8217;)<\/p>\n<p><strong>:has-text():<\/strong> This is another pseudo-class, which matches the element which contains the passed text.<\/p>\n<p>Example: await page.locator(&#8216;:has-text(&#8220;Playwright&#8221;)&#8217;)<\/p>\n<p><i><\/i><\/p>\n<h3 class=\"\" id=\"t-1638970939496\"><b>15. <\/b>How to use assertions in Playwright? List any 5<\/h3>\n<p>Playwright Test uses the jest expect library for assertions.<\/p>\n<p>The Playwright supports soft and hard assertions both.<\/p>\n<p>There are many assertions which expect library provides some of them are<\/p>\n<p><strong>expect(value1).toBe(value2):<\/strong> This helps to compare two values. Like equals of two strings etc.<\/p>\n<p><strong>expect(&lt;Boolean_value1).toBeTruthy():<\/strong> Assert two boolean values to be true.<\/p>\n<p><strong>expect(locator).toBeVisible():<\/strong> Ensured specified locator is Visible on DOM<\/p>\n<p><strong>expect(locator).toContainText(expected_text):<\/strong> Ensures the specific DOM element contains the given text<\/p>\n<p><strong>expect(locator).toHaveClass(expected_class):<\/strong> Ensures the locator has specified css class<\/p>\n<p><strong>expect(locator).toHaveCount(count):<\/strong> Ensures the given locator count in dom should be equal to &#8220;count&#8221;<\/p>\n<p><strong>expect(page).toHaveTitle(title):<\/strong> Verifies the page title is the same as expected<\/p>\n<h3 class=\"\" id=\"t-1638970939498\"><b>16. <\/b>What are soft assertions in Playwright?<\/h3>\n<p>By default when the assertions fail the test terminates, but if we use the soft assertions do not terminate the execution, but the test will be marked as failed at the end.<\/p>\n<p>The Playwright provides a command<\/p>\n<p>expect.soft() for soft assertions<\/p>\n<p>Example:<\/p>\n<p>expect.soft(page.locator(&#8216;#title&#8217;).toHaveText(&#8216;Udemy&#8217;)<\/p>\n<p><b> <\/b><\/p>\n<h3 class=\"\" id=\"t-1638970939499\"><b>17. <\/b>How to negate the Matchers\/Assertions in Playwright? Or How can I verify not conditions in Playwright?<\/h3>\n<p>The Negation matchers are most commonly used in Playwright.<\/p>\n<p>The <strong>.not<\/strong> can be used in Playwright to Negate the assertions<\/p>\n<p>For example, if we have to verify the a should not equal 10 then we can use<\/p>\n<p><strong>expect(a)not.toBe(10)<\/strong><\/p>\n<p>The not is generic keyword can be used with any assertions to negate the condition.<\/p>\n<h3 class=\"\" id=\"t-1638970939500\"><b>18. <\/b>Does Playwright support XPath? If so how can I use them in the test?<\/h3>\n<p>Yes, Playwright supports both CSS and XPath selectors.<\/p>\n<p>The <strong>page.locator()<\/strong> function can be used for XPath.<\/p>\n<p>The page.locator() automatically detects the passed value is XPATH or CSS and returns the locator accordingly<\/p>\n<p>Whenever Playwright sees the selector staring with \/\/ or .. then the playwright assumes it is the XPath<\/p>\n<p>Example:<\/p>\n<p>await page.locator(&#8220;\/\/button[@id=&#8217;someid&#8217;]&#8221;).click();<\/p>\n<h3 class=\"\" id=\"t-1638970939501\"><b>19. <\/b>What are command line options in the Playwright? Explain 5 helpful options<\/h3>\n<p>The configuration file contains the same set of run time configurations, the command line options also provide the run time configurations. When the same option is used in both places the command line options take priority.<\/p>\n<h3 class=\"\" id=\"t-1638970939502\"><b>20. <\/b>Some of the Important command line options<\/h3>\n<ul>\n<li><strong>Run all the tests<\/strong><\/li>\n<\/ul>\n<p>npx playwright test<\/p>\n<ul>\n<li><strong>Run a single test file<\/strong><\/li>\n<\/ul>\n<p>npx playwright test tests\/todo-single.spec.ts<\/p>\n<ul>\n<li><strong>Run multiple tests<\/strong><\/li>\n<li>npx playwright test tests\/todo-page\/ tests\/landing-page\/<\/li>\n<li><strong>Run tests in headed mode<\/strong><\/li>\n<\/ul>\n<p>npx playwright test &#8211;headed<\/p>\n<ul>\n<li><strong>Run tests on Specific browser<\/strong><\/li>\n<\/ul>\n<p>npx playwright test &#8211;browser &#8220;chromium&#8221;<\/p>\n<ul>\n<li><strong>Retry failed test<\/strong><\/li>\n<li>npx playwright test &#8211;retries 2<\/li>\n<\/ul>\n<h3 class=\"\" id=\"t-1638970939503\">21. What is headed and headless mode in Playwright<\/h3>\n<ul>\n<li>The headed mode browser is just like any other browser. For example, if you open a chrome browser opens you can see it visually and perform the action on it.<\/li>\n<li>The headless browser execution happens in the background, the actions and browsers are cannot be seen. The headless browser execution is faster than the headed mode.<\/li>\n<\/ul>\n<h3 class=\"\" id=\"t-1638970939504\">22. Does Playwright support HTML reporters? How to Generate HTML reports in Playwright? \u00a0<\/h3>\n<p>Playwright supports default HTML reporter. You can generate the HTML reporters using the below command.<\/p>\n<p><strong>npx playwright test &#8211;reporter=html<\/strong><\/p>\n<h3 class=\"\" id=\"t-1638970939505\">23. What are timeouts in Playwright? What are the different types of Timeouts available in Playwright?<\/h3>\n<p>Timeout ensures that before marking test execution as a failure the amount of time the Playwright needs to wait.<\/p>\n<p>In Playwright timeouts can be set at different levels<\/p>\n<p><strong>Test timeout:<\/strong> This is applicable for test and fixture execution time.<\/p>\n<p><strong>Expect timeout:<\/strong> Timeout for assertions<\/p>\n<p><strong>Action timeout:<\/strong> Timeout for each action<\/p>\n<p><strong>Navigation timeout: <\/strong>Timeout application for Navigation actions such as page.goto() etc.<\/p>\n<p><strong>Global timeout: <\/strong>Global Timeout for the whole test run<\/p>\n<p><strong>beforeAll\/afterAll timeout:<\/strong> Timeout applicable for beforeAll\/afterAll hooks<\/p>\n<p><strong>Fixture timeout:<\/strong> This timeout is set to individual fixtures.<\/p>\n<h3 class=\"\" id=\"t-1638970939506\">24. How to navigate forward and backward in Playwright?<\/h3>\n<p>The playwright provides specific commands to navigate backward and forward.<\/p>\n<p><strong>page.goForward()<\/strong> command can be used to navigate forward from the browser history<\/p>\n<p><strong>page.goBack()<\/strong> command can be used to navigate backward from the browser history<\/p>\n<h3 class=\"\" id=\"t-1641829942311\">25. How to perform actions using the Playwright?<\/h3>\n<p>The Page class provides different locator strategies. First, you need to find the element using locators and then perform actions.<\/p>\n<p>For example, if you need to perform a click action on a button you can do it as shown below<\/p>\n<p>await page.locator(&#8216;#myButton&#8217;).click();<\/p>\n<h3 class=\"\" id=\"t-1642513700419\">26. Does playwright support the safari browser if so can we execute the test on safari?<\/h3>\n<p>Unlike selenium, Playwright doesn&#8217;t support the Native safari browser. The Playwright supports the open-source version of Safari which is a Webkit browser.<\/p>\n<p>You can execute the tests on the Safari Webkit browser using the configurations in the config file below:<\/p>\n<p>const config = {<\/p>\n<p>\u00a0 use: {<\/p>\n<p>\u00a0\u00a0\u00a0 channel: &#8216;chrome&#8217;,<\/p>\n<p>\u00a0 },<\/p>\n<p>};<\/p>\n<p>By specifying in the command line parameter<\/p>\n<p>npx playwright test &#8211;browser &#8220;webkit&#8221;<\/p>\n<h3 class=\"\" id=\"t-1641829942312\">27. How to wait for a specific element in Playwright?<\/h3>\n<p>The playwright has an auto-waiting mechanism that reduces the usage of explicit waits in the test. However, in some scenarios, we might need to wait for specific elements in that case we can use the .waitFor()<\/p>\n<p>Example:<\/p>\n<p>const someElement = page.locator(&#8216;#myElement);<\/p>\n<p>await someElement.waitFor();<\/p>\n<p>By default waitFor() waits for the element to be visible, however, the behavior can be changed to waitFor attached, detached, hidden<\/p>\n<p>Example: await someElement.waitFor({ state: &#8216;attached&#8217; })<\/p>\n<h3 id=\"t-1688025674510\">28. What is browser context?<\/h3>\n<p>Browser context provides a way to operate multiple independent browser sessions. The browser class provides newContext() method which helps to create a new browser context.<\/p>\n<p>Example:<\/p>\n<p>const contxt = browser.newContext()<\/p>\n<h3 id=\"t-1688025674511\">29. How to open multiple windows in Playwright?<\/h3>\n<p>The playwright provides a way to open multiple windows. In Playwright each window is called Pages.<\/p>\n<p>You can create multiple pages like below<\/p>\n<p>const pageOne = await context.newPage();<\/p>\n<p>const pageTwo = await context.newPage();<\/p>\n<h3 id=\"t-1688025674512\">30. How to handle iFrame in PLaywright?<\/h3>\n<p>The <strong>frameLocator()<\/strong> gets the frame on a particular page in Playwright. Using frameLocator() we can perform various actions on the iFrame<\/p>\n<p>Example:<\/p>\n<p>const button = await page.frameLocator(&#8216;#my_ifr&#8217;).locator(&#8216;#button_my)<\/p>\n<h3 id=\"t-1688025674513\">31. Explain some of the click and double click actions with its options.<\/h3>\n<p><strong>click():<\/strong> action is used for clicking any element on the page.<\/p>\n<p><strong>dblclick:<\/strong> The dblclick() is used to perform the double click on the element.<\/p>\n<p>Both of the above click takes multiple parameters for example:<\/p>\n<p><strong><em>force:<\/em><\/strong> PLaywright waits for actionability it internally checks for if the element is ready to click. The force option helps bypass this option<\/p>\n<p>locator.click({force:true});<\/p>\n<p><strong><em>position:<\/em><\/strong> Position can be used to perform the coordinates with respect to the element.<\/p>\n<p><strong><em>delay:<\/em><\/strong> can be used for time between mouseup and mousedown<\/p>\n<h3 id=\"t-1688025674514\">32. How to perform a right-click on Playwright?<\/h3>\n<p>The playwright doesn&#8217;t have a separate command for right click, in order to right click we need to use the click action with the button parameter<\/p>\n<p>Example:<\/p>\n<p>locator.click({button:right})<\/p>\n<h3 id=\"t-1688025674515\">33. How to evaluate Javascript in Playwright?<\/h3>\n<p>The playwright provides page.evaluate() function, which can be used for evaluating any javascript function.<\/p>\n<p>Example:<\/p>\n<p>const href = await page.evaluate(() =&gt; document.location.href);<\/p>\n<h3 id=\"t-1688025674516\">34. What are Playwright fixtures?<\/h3>\n<p>Test fixtures are used to establish an environment for each test. Some of the pre-defined fixtures are page, context, browser, browserName. The fixture is isolated for each test.<\/p>\n<p>Consider you have multiple tests like below<\/p>\n<p>test(&#8216;basic test&#8217;, async ({ page }) =&gt; {<\/p>\n<p>\u00a0 await page.goto(&#8216;https:\/\/playwright.dev\/&#8217;);<\/p>\n<p>});<\/p>\n<p>test(&#8216;basic click, async ({ page }) =&gt; {<\/p>\n<p>\u00a0\u00a0await page.locator(&#8216;#logo&#8217;).click();<\/p>\n<p>});<\/p>\n<p>Though you expect the above test to be executed one after the other, the test runs and fails. As the page fixture is isolated.<\/p>\n<p>You can override the default fixtures like below.<\/p>\n<p>For example, the above test can be rewritten to execute correctly<\/p>\n<p>let todoPage;<\/p>\n<p>test.beforeEach(async ({ page }) =&gt; {<\/p>\n<p>\u00a0\u00a0\u00a0 todoPage = new TodoPage(page);<\/p>\n<p>\u00a0 });<\/p>\n<p>test(&#8216;basic test&#8217;, async () =&gt; {<\/p>\n<p>\u00a0 await todoPage.goto(&#8216;https:\/\/playwright.dev\/&#8217;);<\/p>\n<p>});<\/p>\n<p>test(&#8216;basic click, async () =&gt; {<\/p>\n<p>\u00a0 await todoPage.locator(&#8216;#logo&#8217;).click();<\/p>\n<p>});<\/p>\n<p>You can notice that the <strong>todoPage<\/strong> is shared between tests.<\/p>\n<h3 id=\"t-1688025674517\">35. What is CodeGen in Playwright?<\/h3>\n<p>Playwright codeGen is similar to the selenium test recorder, the <strong>CodeGen<\/strong> is a tool that comes with playwright you can use it for recording the Playwright tests.<\/p>\n<h3 id=\"t-1688025674518\">36. How to parameterize tests in Playwright?<\/h3>\n<p>Parameterize helps to run the same tests with multiple values, some times it is also called as data-driven testing. Playwright allows parameterization, you can use data from either csv, json or plain arrays. To implement parameterization you need to use for or foreach loop.<\/p>\n<p>Example:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 const fruits = [&#8216;Banana&#8217;, &#8216;Orange&#8217;,&#8217;Apple&#8217;];<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for (const name of fruits) {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 test(`testing with ${name}`, async () =&gt; {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/your code<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 });<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0}<\/p>\n<h3 id=\"t-1688025674519\">37. Write a code to upload the file<\/h3>\n<ul>\n<li>The playwright provides a special command to upload a single file or multiple files. The command setInputFile() or setInputFiles() is used for uploading the file in Playwright.<\/li>\n<li>Example:<\/li>\n<li><strong>Upload single file:<\/strong><\/li>\n<\/ul>\n<p>await page.getByLabel(&#8216;Upload file &#8216;).setInputFiles(&#8216;myfile.pdf&#8217;);<\/p>\n<ul>\n<li><strong>Upload multiple files:<\/strong><\/li>\n<\/ul>\n<p>await page.getByLabel(&#8216;Upload files&#8217;).setInputFiles([&#8216;file1.pdf&#8217;, &#8216;file2.pdf&#8217;]);<\/p>\n<ul>\n<li><strong><em>Note: Passing empty array to setInputFiles() makes unselect the files if you are already selected.<\/em><\/strong><\/li>\n<li>Example:<\/li>\n<\/ul>\n<p>await page.getByLabel(&#8216;Upload file&#8217;).setInputFiles([]);<\/p>\n<h3 id=\"t-1688025674520\">38. Write a code to download the file<\/h3>\n<ul>\n<li>The upload and download files are edge case scenarios, Playwright has dedicated commands for both. The download files can be performed in the playwright using the waitForEvent() in the playwright.<\/li>\n<li>Example:<\/li>\n<\/ul>\n<p>const [ download ] = await Promise.all([<\/p>\n<p>\u00a0 page.waitForEvent(&#8216;download&#8217;),<\/p>\n<p>\u00a0 \/\/ Perform the action that initiates download<\/p>\n<p>\u00a0 page.locator(&#8216;button#delayed-download&#8217;).click(),<\/p>\n<p>]);<\/p>\n<ul>\n<li>Once the download is complete you can get the downloaded path using the command<\/li>\n<\/ul>\n<p>const downloadedPath = await download.path();<\/p>\n<h3 id=\"t-1688025674521\">39. How to perform drag and drop in Playwright?<\/h3>\n<ul>\n<li>Drag and drop can be performed using multiple ways<\/li>\n<li>Using dragTo() command<\/li>\n<li>Manually specifying mouse actions<\/li>\n<\/ul>\n<p><strong>Using dragTo() function for drag and drop<\/strong><\/p>\n<p>You need to pass the target position locator to dragTo function<\/p>\n<p>Example:<\/p>\n<p>await page.locator(&#8216;#item-to-be-dragged&#8217;).dragTo(page.locator(&#8216;#item-to-drop-at&#8217;));<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 The above dragTo() function internally does<\/p>\n<ul>\n<li>Hovers on the item to be dragged<\/li>\n<li>Clicks on the item to be dragged<\/li>\n<li>Move the mouse to target location<\/li>\n<li>Rleases the left mouse button<\/li>\n<\/ul>\n<p>As mentioned earlier, you can use the manual method, by perfoming all the above actions instead of dragTo() function.<\/p>\n<p><strong>Manual way to drag and drop<\/strong><\/p>\n<p>await page.locator(&#8216;#item-to-be-dragged&#8217;).hover();<\/p>\n<p>await page.mouse.down();<\/p>\n<p>await page.locator(&#8216;#item-to-drop-at&#8217;).hover();<\/p>\n<p>await page.mouse.up();<\/p>\n<h3 id=\"t-1688025674522\">40. How to handle browser popups or dialogs?<\/h3>\n<ul>\n<li>Dialog popups are native to the browser or operating systems. The dialogs need special mechanism to handle as you cannot inspect the locator for these pop-ups.<\/li>\n<li>There are different types of pop ups such as alert(), confirm(), prompt()<\/li>\n<li><strong>Handling Alert<\/strong><\/li>\n<li>\/\/Click on Ok<\/li>\n<\/ul>\n<p>page.on(&#8216;dialog&#8217;, dialog =&gt; dialog.accept());<\/p>\n<ul>\n<li><strong>Handling confirm<\/strong><\/li>\n<li>\/\/Click on Ok<\/li>\n<\/ul>\n<p>page.on(&#8216;dialog&#8217;, dialog =&gt; dialog.accept());<\/p>\n<p>\/\/Click on Cancel<\/p>\n<p>page.on(&#8216;dialog&#8217;, dialog =&gt; dialog.dismiss ());<\/p>\n<ul>\n<li><strong>Handling Prompt<\/strong><\/li>\n<li>\/\/Type the text, RSAcademy and Accept the pop up<\/li>\n<\/ul>\n<p>page.on(&#8216;dialog&#8217;, dialog =&gt; dialog.accept(&#8220;RSAcademy&#8221;));<\/p>\n<h3 id=\"t-1688025674523\">41. What is testInfo Object?<\/h3>\n<p>testInfo object contains information about tests that are currently running such as duration, errors, project, status, \u00a0etc. Using the testInfo object we can control the test execution.<\/p>\n<h3 id=\"t-1688025674524\">42. What is testError Object?<\/h3>\n<p>The testError object in PLaywright contains information about errors thrown during the test execution such as error message, stack, and value.<\/p>\n<h3 id=\"t-1688025674525\">43. What is global setup and tear down explain?<\/h3>\n<ul>\n<li>The global setup is one-time setup that is needed for test execution. The global setup is executed before starting any tests. For example, if you want to set up some files, and URLs you can utilize this function.<\/li>\n<li>Similarly, the global teardown is a one-time teardown option provided by Playwright. The global teardown will be executed after all the tests are executed. This will be helpful to generate custom reports, sending emails, freeing up resources, etc.<\/li>\n<li><strong>Example Global Set up<\/strong><\/li>\n<\/ul>\n<p>\/\/ global-setup.js<\/p>\n<p>module.exports = async config =&gt; {<\/p>\n<p>\u00a0 const {storageState } = config.projects[0].use;<\/p>\n<p>};<\/p>\n<p>\/\/ playwright.config.js<\/p>\n<p>const config = {<\/p>\n<p>\u00a0 globalSetup: require.resolve(&#8216;.\/global-setup&#8217;),<\/p>\n<p>\u00a0 use: {<\/p>\n<p>\u00a0\u00a0\u00a0 storageState: &#8216;state.json&#8217;,<\/p>\n<p>\u00a0 },<\/p>\n<p>};<\/p>\n<p>module.exports = config;<\/p>\n<ul>\n<li><strong>Example Global Teardown<\/strong><\/li>\n<\/ul>\n<p>\/\/ global-teardown.js<\/p>\n<p>module.exports = async config =&gt; {<\/p>\n<p>\u00a0\/\/Some code<\/p>\n<p>};<\/p>\n<p>\/\/ playwright.config.js<\/p>\n<p>const config = {<\/p>\n<p>\u00a0 globalTeardown: require.resolve(&#8216;.\/global-teardown),<\/p>\n<p>\u00a0 use: {<\/p>\n<p>\u00a0\u00a0\u00a0 storageState: &#8216;state.json&#8217;,<\/p>\n<p>\u00a0 },<\/p>\n<p>};<\/p>\n<p>\u00a0module.exports = config;<\/p>\n<p><\/p>\n<h3 id=\"t-1688025674526\">44. How to capture Network logs in Playwright?<\/h3>\n<p>The playwright provides a way to monitor browser network logs. You can capture all the request and response network logs and their status. Using the listener<\/p>\n<p>page.on(&#8216;request&#8217;, request =&gt;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 console.log(&#8216;&gt;&gt;&#8217;, request.method(), request.url()));<\/p>\n<p>\u00a0 page.on(&#8216;response&#8217;, response =&gt;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 console.log(&#8216;&lt;&lt;&#8216;, response.status(), response.url()));<\/p>\n<p>\u00a0 await page.goto(&#8216;https:\/\/example.com&#8217;);<\/p>\n<h3 id=\"t-1688025674527\">45. How to capture screenshots in PLaywright?<\/h3>\n<ul>\n<li>The Playwright allows taking the screenshot. the page.screenshot() function is provided by Playwright to the screenshot. You can place the screenshot() command anywhere in the code to save the screenshot.<\/li>\n<li><strong>Take the full page screenshot<\/strong><\/li>\n<\/ul>\n<p>await page.screenshot({ path: &#8216;screenshot.png&#8217;, fullPage: true });<\/p>\n<ul>\n<li><strong>Take the Element level screenshot<\/strong><\/li>\n<\/ul>\n<p>await page.locator(&#8216;.header&#8217;).screenshot({ path: &#8216;screenshot.png&#8217; });<\/p>\n<h3 id=\"t-1688025674528\">46. Does Playwright support API testing? If so how can we perform API testing?<\/h3>\n<p>Yes, Playwright supports API Testing. We can perform any HTTP API method calls such as GET, POST etc. using the playwright and validate the status and responses.<\/p>\n<p>Example:<\/p>\n<p>test(&#8220;Get users&#8221;, async ({ request, baseURL }) =&gt; {<\/p>\n<p>\u00a0 const apiResponse = await request.get(`${baseURL}public\/v2\/users\/`);<\/p>\n<p>\u00a0 expect(apiResponse.ok()).toBeTruthy();<\/p>\n<p>\u00a0 expect(apiResponse.status()).toBe(200);<\/p>\n<p>});<\/p>\n<h3 id=\"t-1688025674529\">47. What is Visual Testing? Why do we need it?<\/h3>\n<ul>\n<li>Visual Testing is also known as visual comparisons, where two screenshots will be compared. The first screenshot is called the reference or base image, the subsequent run will compare the recent screenshot with reference images and produce the results.<\/li>\n<li>Visual comparison testing is helpful for UI testing. Using functional testing we will not be able to validate the fonts, styles, typography, alignment, etc. but using the visual comparison we can validate everything related to the application User interface.<\/li>\n<\/ul>\n<h3 id=\"t-1688025674530\">48. Write a simple code to Test Visually<\/h3>\n<p>For example, if we need to compare the home page we need to write the below code in Playwright.<\/p>\n<p>test(&#8216;Visual test homepage&#8217;, async ({ page }) =&gt; {<\/p>\n<p>\u00a0 await page.goto(&#8216;https:\/\/playwright.dev&#8217;);<\/p>\n<p>\u00a0 await expect(page).toHaveScreenshot();<\/p>\n<p>});<\/p>\n<ul>\n<li>During the first run, the playwright stores the reference image of the homepage, and the next run will be compared against the reference image.<\/li>\n<li>Optionally we can pass the pixel differences if we need to ignore the minor differences in the image.<\/li>\n<\/ul>\n<p>test(&#8216;example test&#8217;, async ({ page }) =&gt; {<\/p>\n<p>\u00a0 await page.goto(&#8216;https:\/\/playwright.dev&#8217;);<\/p>\n<p>\u00a0 await expect(page).toHaveScreenshot({ maxDiffPixels: 100 });<\/p>\n<p>});<\/p>\n<h3 id=\"t-1688025674531\">49. <strong>How to configure multiple reporters in Playwright?<\/strong><\/h3>\n<p>The playwright allows configuring multiple reporters. The reporter option is available on the playwright.config.js, you can specify the reporter types to configure multiple reporters.<\/p>\n<p>Example:<\/p>\n<p>\/\/ playwright.config.js<\/p>\n<p>const config = {<\/p>\n<p>\u00a0 reporter: [<\/p>\n<p>\u00a0\u00a0\u00a0 [&#8216;list&#8217;],<\/p>\n<p>\u00a0\u00a0\u00a0 [&#8216;line&#8217;],<\/p>\n<p>\u00a0\u00a0\u00a0 [&#8216;json&#8217;, {\u00a0 outputFile: &#8216;test-results.json&#8217; }]<\/p>\n<p>\u00a0 ],<\/p>\n<p>};<\/p>\n<p>module.exports = config;<\/p>\n<h3 id=\"t-1688025674532\">50. What is the serial mode in Playwright?<\/h3>\n<p>In some scenarios, tests may be inter dependent. The second test might need the output of the first one. Running tests parallelly in such cases will create the test cases to fail and it&#8217;s like a false failure. The serial mode allows running the tests serially one after the another. If one test fails all remaining tests are skipped and can be retried as a group again.<\/p>\n<p>Example:<\/p>\n<p>test.describe.configure({ mode: &#8216;serial&#8217; });<\/p>\n<p>let page;<\/p>\n<p>test.beforeAll(async ({ browser }) =&gt; {<\/p>\n<p>\u00a0 page = await browser.newPage();<\/p>\n<p>});<\/p>\n<p>test.afterAll(async () =&gt; {<\/p>\n<p>\u00a0 await page.close();<\/p>\n<p>});<\/p>\n<p>test(&#8216;runs first&#8217;, async () =&gt; {<\/p>\n<p>\u00a0 await page.goto(&#8216;https:\/\/playwright.dev\/&#8217;);<\/p>\n<p>});<\/p>\n<p>test(&#8216;runs second&#8217;, async () =&gt; {<\/p>\n<p>\u00a0 await page.getByText(&#8216;Get Started&#8217;).click();<\/p>\n<p>});<\/p>\n<h3 id=\"t-1688025674533\">51. How to perform parallel execution in PLaywright?<\/h3>\n<ul>\n<li>The playwright supports parallel execution. Parallel execution can be achieved at the global level or test level in the playwright.<\/li>\n<li>Parallel in test file level<\/li>\n<li>The mode: &#8216;parallel&#8217; can be passed to describe.configure() function to achieve parallelism.<\/li>\n<\/ul>\n<p>Example:<\/p>\n<p>test.describe.configure({ mode: &#8216;parallel&#8217; });<\/p>\n<p>test(&#8216;runs in parallel 1&#8217;, async ({ page }) =&gt; { \/* &#8230; *\/ });<\/p>\n<p>test(&#8216;runs in parallel 2&#8217;, async ({ page }) =&gt; { \/* &#8230; *\/ });<\/p>\n<ul>\n<li>Parallel option in the playwright config file<\/li>\n<li>We can mention the fullyParallel option in the configuration file, this makes the tests run parallelly to all tests.<\/li>\n<\/ul>\n<p>\/\/playwright.config.js<\/p>\n<p>const config = {<\/p>\n<p>\u00a0 fullyParallel: true,<\/p>\n<p>};<\/p>\n<p>module.exports = config;<\/p>\n<h3 id=\"t-1688025674534\">52. How to perform mobile device emulation in Playwright?<\/h3>\n<ul>\n<li>The emulation features allow testing the application in mobile mode or tablet mode by changing the properties of the browser such as screensize, useragent, geolocation etc.<\/li>\n<li>For example, if we need to test the mobile safari we can specify the option in the playwright config file like below.<\/li>\n<\/ul>\n<p>const config = {<\/p>\n<p>\u00a0 projects: [<\/p>\n<p>\u00a0\u00a0\u00a0 {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 name: &#8216;Mobile Safari&#8217;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 use: {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8230;devices[&#8216;iPhone 12&#8217;],<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 },<\/p>\n<p>\u00a0\u00a0\u00a0 },<\/p>\n<p>\u00a0 ],<\/p>\n<p>};<\/p>\n<p>module.exports = config;<\/p>\n<ul>\n<li>Similarly, we can set the viewport to match the mobile or tablet screen size<\/li>\n<\/ul>\n<p>const config = {<\/p>\n<p>\u00a0\u00a0use: {<\/p>\n<p>\u00a0\u00a0\u00a0 viewport: { width: 580, height: 720 },<\/p>\n<p>\u00a0 },<\/p>\n<p>};<\/p>\n<p>module.exports = config;<\/p>\n<h3 id=\"t-1688025674535\">53. Mention some of the helpful ways to debug Playwright tests.<\/h3>\n<ul>\n<li>The playwright provides multiple ways to debug.<\/li>\n<li>Using the debug option in the command line.<\/li>\n<\/ul>\n<p>npx playwright test &#8211;debug<\/p>\n<ul>\n<li><strong>Debug single test<\/strong><\/li>\n<\/ul>\n<p>npx playwright test example.spec.ts &#8211;debug<\/p>\n<p><strong>VSCode extension<\/strong><\/p>\n<ul>\n<li>Apart from the command line debugging option Playwright also provides the VSCode extension &#8220;<strong>Playwright Test for VSCode&#8221;<\/strong><\/li>\n<li><strong>Trace on option<\/strong><\/li>\n<li>You can also force the Playwright to record the trace by passing the &#8211;trace on option.<\/li>\n<li>Example:<\/li>\n<\/ul>\n<p>npx playwright test &#8211;trace on<\/p>\n<p><strong>Pause option<\/strong><\/p>\n<p>page.pause() can also be used inside the test script to pause the test and do some debugging.<\/p>\n<h3 id=\"t-1688025674536\">54. What is actionability in Playwright? Explain in detail<\/h3>\n<ul>\n<li>Playwright architecture has a special type of checks before performing any actions on elements. The checks are called actionability checks.<\/li>\n<li>For example when you do click operation page.click()<\/li>\n<li>It will perform many checks internally such as<\/li>\n<li>Element is attached to DOM<\/li>\n<li>Element is Visible<\/li>\n<li>Element is Stable and animation is completed(if any)<\/li>\n<li>Element is ready to receive the events<\/li>\n<li>Element is enabled.<\/li>\n<\/ul>\n<p>This mechanism is also called automatic waiting in the Playwright. Since the Playwright performs all the above checks by default one is no need to perform the above checks manually.<\/p>\n<h3 id=\"t-1688025674537\">55. Mention some of the advantages of Playwright compared to Cypress<\/h3>\n<li>The Cypress and Playwright share a lot of similarities and Playwright overcomes a lot of limitations that cypress has<\/li>\n<li>The playwright supports iFrame, Cypress doesn\u2019t<\/li>\n<li>Playwright supports multiple windows\/tabs, Cypress doesn&#8217;t<\/li>\n<li>A playwright can test the cross-domain URLs whereas Cypress doesn&#8217;t support<\/li>\n<li>Playwright supports Safari Webkit browser Cypress doesn&#8217;t support Safari<\/li>\n<li>Playwright supports multiple languages such as Java, Javascript, Python, and C#, the Cypress supports only Javascript\/Typescript\u00a0<\/li>\n<p><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tcb_flag\" style=\"display: none\"><\/div>\n<\/section>\n<p><\/body><\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Table of Contents \u00a01.\u00a0What is Playwright? 2. What is the difference between Selenium and Playwright? 3.What are the advantages of a Playwright? 4. Name some disadvantages of Playwright. 5. What are the different testing types the Playwright supports? 6. What are the programming languages that the playwright supports 7. Briefly describe the commands that are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,9],"tags":[],"class_list":["post-2418","post","type-post","status-publish","format-standard","hentry","category-interview-questions","category-playwright","post-wrapper","thrv_wrapper"],"_links":{"self":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2418"}],"version-history":[{"count":0,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2418\/revisions"}],"wp:attachment":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}