回答編集履歴
1
現在のファイルの修正例提示
test
CHANGED
@@ -29,3 +29,63 @@
|
|
29
29
|
|
30
30
|
|
31
31
|
参考:https://github.com/SeleniumHQ/selenium/pull/8647#issuecomment-690590293
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
よって現在のファイルを修正するなら以下のようにするのが良いかと思います。
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
```python
|
40
|
+
|
41
|
+
import tkinter
|
42
|
+
|
43
|
+
#import tkinter as tk
|
44
|
+
|
45
|
+
import tkinter.ttk as ttk
|
46
|
+
|
47
|
+
from tkinter import filedialog
|
48
|
+
|
49
|
+
root = tkinter.Tk()
|
50
|
+
|
51
|
+
root.title("登録システム")
|
52
|
+
|
53
|
+
root.geometry("550x850")
|
54
|
+
|
55
|
+
from selenium import webdriver
|
56
|
+
|
57
|
+
from selenium.webdriver.common.alert import Alert
|
58
|
+
|
59
|
+
from selenium.webdriver.support.ui import Select
|
60
|
+
|
61
|
+
import datetime
|
62
|
+
|
63
|
+
from webdriver_manager.chrome import ChromeDriverManager
|
64
|
+
|
65
|
+
from selenium.webdriver.chrome.options import Options
|
66
|
+
|
67
|
+
from selenium.webdriver.chrome.service import Service
|
68
|
+
|
69
|
+
from subprocess import CREATE_NO_WINDOW
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
#driver = webdriver.Chrome(ChromeDriverManager().install())
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
service = Service(r"C:\Users\たけし\OneDrive\デスクトップ\prof\chromedriver.exe")
|
78
|
+
|
79
|
+
service.creationflags = CREATE_NO_WINDOW
|
80
|
+
|
81
|
+
options = Options()
|
82
|
+
|
83
|
+
options.add_argument('--headless')
|
84
|
+
|
85
|
+
browser = webdriver.Chrome(service=service, chrome_options=options)
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
root.mainloop()
|
90
|
+
|
91
|
+
```
|