質問編集履歴
2
実行しましたコードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,29 @@
|
|
1
1
|
chromeドライバをWindowsでインストールを行うにはどちら[https://chromedriver.chromium.org/downloads](https://chromedriver.chromium.org/downloads)を選択すればよいのでしょうか。
|
2
2
|
|
3
3
|
![コード、出力結果](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-18/5bcf6cd1-29e7-487d-b48c-a6859d60135c.jpeg)
|
4
|
+
|
5
|
+
|
6
|
+
```python3
|
7
|
+
import time
|
8
|
+
|
9
|
+
from selenium import webdriver
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
driver = webdriver.Chrome(r"C:\Users\AKFU\Downloads\chromedriver_win32 test\chromedriver.exe" ) # Optional argument, if not specified will search path.
|
14
|
+
|
15
|
+
driver.get('http://www.google.com/');
|
16
|
+
|
17
|
+
time.sleep(5) # Let the user actually see something!
|
18
|
+
|
19
|
+
search_box = driver.find_element_by_name('q')
|
20
|
+
|
21
|
+
search_box.send_keys('ChromeDriver')
|
22
|
+
|
23
|
+
search_box.submit()
|
24
|
+
|
25
|
+
time.sleep(5) # Let the user actually see something!
|
26
|
+
|
27
|
+
driver.quit()
|
28
|
+
|
29
|
+
```
|
1
実行結果
test
CHANGED
File without changes
|
test
CHANGED
@@ -1 +1,3 @@
|
|
1
1
|
chromeドライバをWindowsでインストールを行うにはどちら[https://chromedriver.chromium.org/downloads](https://chromedriver.chromium.org/downloads)を選択すればよいのでしょうか。
|
2
|
+
|
3
|
+
![コード、出力結果](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-18/5bcf6cd1-29e7-487d-b48c-a6859d60135c.jpeg)
|