質問編集履歴
1
該当html追加とエラー内容追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
chormedriverでpython file.pyをすると無事ファイルは開くのですが、ログイン・パスが自動入力されるはずが何度行なっても入力が行われません。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
エラー文にはclassに対するエラーが出ておりますが、エラー解消を特定出来ておりません。
|
6
10
|
|
7
11
|
|
8
12
|
|
@@ -54,11 +58,97 @@
|
|
54
58
|
|
55
59
|
```
|
56
60
|
|
57
|
-
Traceback (most recent call last):
|
58
|
-
|
59
61
|
File "instagram.py", line 14, in <module>
|
60
62
|
|
61
63
|
elem_search_word = driver.find_element_by_class_name("_2hvTZ")
|
64
|
+
|
65
|
+
File "/Users/***/.pyenv/versions/3.7.4/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 564, in find_element_by_class_name
|
66
|
+
|
67
|
+
return self.find_element(by=By.CLASS_NAME, value=name)
|
68
|
+
|
69
|
+
File "/Users/***/.pyenv/versions/3.7.4/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
|
70
|
+
|
71
|
+
'value': value})['value']
|
72
|
+
|
73
|
+
File "/Users/***/.pyenv/versions/3.7.4/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
|
74
|
+
|
75
|
+
self.error_handler.check_response(response)
|
76
|
+
|
77
|
+
File "/Users/***/.pyenv/versions/3.7.4/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
|
78
|
+
|
79
|
+
raise exception_class(message, screen, stacktrace)
|
80
|
+
|
81
|
+
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"class name","selector":"_2hvTZ"}
|
82
|
+
|
83
|
+
(Session info: chrome=77.0.3865.120)
|
84
|
+
|
85
|
+
(Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.14.6 x86_64)
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
```
|
94
|
+
|
95
|
+
<div class="EPjEi">
|
96
|
+
|
97
|
+
<form class="HmktE" method="post">
|
98
|
+
|
99
|
+
<div class=" Igw0E IwRSH eGOV_ _4EzTm FBi-h ">
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div class="-MzZI">
|
104
|
+
|
105
|
+
<div class="_9GP1n ">
|
106
|
+
|
107
|
+
<label class="f0n8F ">
|
108
|
+
|
109
|
+
<span class="_9nyy2">電話番号、ユーザーネーム、メールアドレス</span>
|
110
|
+
|
111
|
+
<input class="_2hvTZ pexuQ zyHYP" aria-label="電話番号、ユーザーネーム、メールアドレス" aria-required="true" autocapitalize="off" autocorrect="off" maxlength="75" name="username" type="text" value="">
|
112
|
+
|
113
|
+
</label>
|
114
|
+
|
115
|
+
<div class="i24fI">
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div class="-MzZI">
|
124
|
+
|
125
|
+
<div class="_9GP1n ">
|
126
|
+
|
127
|
+
<label class="f0n8F ">
|
128
|
+
|
129
|
+
<span class="_9nyy2">パスワード</span>
|
130
|
+
|
131
|
+
<input class="_2hvTZ pexuQ zyHYP" aria-label="パスワード" aria-required="true" autocapitalize="off" autocorrect="off" name="password" type="password" value=""></label>
|
132
|
+
|
133
|
+
<div class="i24fI"></div></div></div>
|
134
|
+
|
135
|
+
<div class=" Igw0E IwRSH eGOV_ _4EzTm bkEs3 CovQj jKUp7 DhRcB ">
|
136
|
+
|
137
|
+
<button class="sqdOP L3NKy y3zKF " disabled="" type="submit">
|
138
|
+
|
139
|
+
<div class=" Igw0E IwRSH eGOV_ _4EzTm ">ログイン</div></button></div>
|
140
|
+
|
141
|
+
<div class="K-1uj Z7p_S"><div class="s311c"></div><div class="_0tv-g">または</div><div class="s311c"></div></div>
|
142
|
+
|
143
|
+
<div class=" Igw0E IwRSH eGOV_ _4EzTm bkEs3 CovQj jKUp7 DhRcB ">
|
144
|
+
|
145
|
+
<button class="sqdOP yWX7d y3zKF " type="button">
|
146
|
+
|
147
|
+
<span class="coreSpriteFacebookIcon AeB99"></span>
|
148
|
+
|
149
|
+
<span class="KPnG0">Facebookでログイン</span></button></div>
|
150
|
+
|
151
|
+
<a class="_2Lks6" href="/accounts/password/reset/">パスワードを忘れた場合</a></form></div>
|
62
152
|
|
63
153
|
```
|
64
154
|
|