diff --git a/dataframe_image/converter/browser/playwright_converter.py b/dataframe_image/converter/browser/playwright_converter.py index da95a7d..a95ed41 100644 --- a/dataframe_image/converter/browser/playwright_converter.py +++ b/dataframe_image/converter/browser/playwright_converter.py @@ -98,8 +98,8 @@ async def screenshot(self, html): ) page = await context.new_page() await page.set_content(self.build_valid_html(html)) - locator = await page.locator("#dfi_table table") - bbox = locator.bounding_box() + locator = page.locator("#dfi_table table") + bbox = await locator.bounding_box() width = bbox["width"] height = bbox["height"] await page.set_viewport_size(