I'm trying to find an example of using Playwright to scaping data from the web. Data with numerous <div> tags is placed on the webpage. I need to extract it from the tag <span> to array for the tag <product-key-value>. The majority of the code was obtained from here. This is one possible code, but it didn't work: product_section = page.locator('//div[@class="product-key-value"]') spans = product_section.locator('span') span_elements = spans.element_handles() data_array = [span.text_content() for span in span_elements] print(data_array) Similar solution, but useless for me: Playwright - get all child divs of div by div ids (TypeScript) PlayWright - Getting the value of element <dd> inside <div> This is a screenshot target page Continue reading...