This thread is trying to answer question "How to open a new tab in Playwright using Python instead of a new window?"
Could you try something like this:
driver.find_element_by_tag_name('body').send_keys(Keys.COMMAND + 't')
Below is how i swap tabs after I click a button and i return the second tab as the main page for the
# We want to return the new tab that was opened as the new page return SignupPage(self.page.context.pages)
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 firstname.lastname@example.org.