Rayrun
← Back to Discord Forum

adapting the codes in selenium to playwright

ferman2323
ferman2323

i am using these codes in selenium but now i will use playwright but i don't know how to adapt it can you help me

elements = driver.find_elements('class name', 'sVXRqc') for x in elements: print(x.text)

This thread is trying to answer question "How can I adapt my Selenium codes to Playwright?"

2 replies

That should result in something like :

for x in page.locator('.sVXRqc').all():
  print(x.textContent())

Bur explore the documentation and try for yourself 😉 it's well explained

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.