I have a use case where I need to spin up a browser, navigate to a section of the site and leave them on a page until they get killed by another process. Need this code in python.
Here's my code: `await page.goto("https://thoughtspot.okta.com/signin/verify/duo/web") await asyncio.sleep(10)
iframe = page.frame_locator('iframe[title="Duo Security"]')
element_within_iframe = iframe.locator('.row-label.push-label') await element_within_iframe.click()`
I want the browser to stay open after the last line of code.
This thread is trying to answer question "Is there a way to make browsers stay open after a test is finished using Python?"
If your plan is to wait till it executes your previous case then you should revise and fix that code as per has inbuilt mechanism for such operations! Use this as reference not a solution https://stackoverflow.com/questions/72462437/how-to-prevent-the-browser-from-closing-while-running-code-in-playwright-tests-i
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 [email protected].