Udemy Playwright: Web Automation Testing From Zero to Hero: Difference between revisions

Jump to navigation Jump to search
m
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>


==== next ====
==== 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

Navigation menu