Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to avoid close chrome after execution #148

Closed
DiMiTriFrog opened this issue May 15, 2022 · 4 comments
Closed

Any way to avoid close chrome after execution #148

DiMiTriFrog opened this issue May 15, 2022 · 4 comments

Comments

@DiMiTriFrog
Copy link

I need any way to keep the browser opened after code execution will finished.

@DiMiTriFrog DiMiTriFrog changed the title Any way for avoid close chrome after execution Any way to avoid close chrome after execution May 18, 2022
@Et9797
Copy link

Et9797 commented May 25, 2022

To do this instead of get_session() I used start_session(). This will leave the drivers running however: to kill the drivers os.system("taskkill /f /im chromedriver/msedgedriver.exe") on Windows.

@DiMiTriFrog
Copy link
Author

Hi! Thanks for the response.
I tried it but browser opens but isn't loading any.

@Et9797
Copy link

Et9797 commented May 25, 2022

@DiMiTriFrog Should work. Make sure to import services and browser

from arsenic.services import Chromedriver
from arsenic.browsers import Chrome
service = Chromedriver()
browser = Chrome()
session = await start_session(service, browser)
await session.get("https://google.com")

now you can pass on the session object variable to other functions

@DiMiTriFrog
Copy link
Author

So right! I reboot my pc, so tests with chromedrivers.

Thanks so much, is working for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants