I skimmed through similar questions, but all questions seem to be focused around 'locating span tag by text', but my goal is to 'get all texts within span tag'.
ex)
from playwright.sync_api import sync_playwright
browser = pw.chromium.launch(headless=False)
context = browser.new_context(viewport={"width": 1920, "height": 1080})
page = context.new_page()
url = 'https://announcements.bybit.com/en-US/?category=new_crypto&page=6'
page.goto(url)
page.wait_for_timeout(2000)
print(page.get_by_test_id('//span').inner_text())
x = page.locator("//span[text()='New Listing: TAMA/USDT — Grab a Share of the 4,000,000 TAMA Prize Pool']")
x.click()
the above code detects a span tag by text, and clicks on it.
However, I cannot find a way to locate all tags, and retrive all texts within the span tags.
Is there any possible way to do so?