@mablhq/playwright-tools 2.52.4 → 2.52.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -157,13 +157,15 @@ test('Validate PDFs downloaded from the app', async ({
157
157
  mabl,
158
158
  }) => {
159
159
  await page.goto('https://sandbox.mabl.com');
160
- await page.locator("a:has-text('downloads and pdfs')");
160
+ await page.waitForSelector("a:has-text('downloads and pdfs')");
161
+ // click the downloads and pdfs button
162
+ await page.click("a:has-text('downloads and pdfs')");
161
163
 
162
164
  // get ready for the download
163
165
  const downloadPromise = page.waitForEvent('download');
164
-
165
- // click to download PDF
166
- await page.locator("a:has-text('download pdf')").click();
166
+
167
+ // click the download button/link
168
+ await page.click("a:has-text('download pdf')");
167
169
 
168
170
  // wait for download to complete
169
171
  const download = await downloadPromise;