1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Selenium + pyinstallerで実行後コンソールが閉じない問題の対処

Last updated at Posted at 2024-03-10

概要

Seleniumでブラウザ操作するスクリプトを作成、配布用にpyinstallerでexeファイルにした。

しかし、実行後にコンソールが閉じない。(手動で閉じる必要ありという症状)

試したこと

以下全てで改善せず。

sys.exit()
quit()
os._exit()

原因

SeleniumのWebdriverを一切終了していなかったことが原因。

driver.quit()

で解決。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?