← Back to Discord Forum

adapting the codes in selenium to playwright


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():

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

Related Discord Threads

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.