Udemy Playwright: Web Automation Testing From Zero to Hero: Difference between revisions
Jump to navigation
Jump to search
Udemy Playwright: Web Automation Testing From Zero to Hero (view source)
Revision as of 20:20, 20 May 2024
, 20 May→next
m (→next) |
|||
Line 91: | Line 91: | ||
* Notice the <code>page</code> fixture, it has a lot of useful methods, eg. <code>page.goto('url')</code> and <code>page.getByText('label')</code> | * Notice the <code>page</code> fixture, it has a lot of useful methods, eg. <code>page.goto('url')</code> and <code>page.getByText('label')</code> | ||
==== | ==== Hooks & Control Flow ==== | ||
* <code>tes.describe(' a test suite'...)</code> | |||
* <code>test.beforeEach()</code> and <code>test.beforeAll()</code> | |||
:: can be used outside as well as inside a suite | |||
* <code>.only(..)</code> can be used on tests as well as suites | |||
* <code>test.afterEach()</code> and <code>test.afterAll()</code> | |||
:: try to avoid using the after... hooks, better to do it in the before... hooks |