質問編集履歴
2
タイトルの文章がわかりにくかったので変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
seleniumで
|
1
|
+
seleniumでロードするたびにidが変わる要素をクリックしたい
|
test
CHANGED
File without changes
|
1
実行コードの書き忘れと、find_elements_by_xpathからfind_element_by_xpathにしたのでエラー内容を変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,19 +24,17 @@
|
|
24
24
|
|
25
25
|
```
|
26
26
|
|
27
|
-
Traceback (most recent call last):
|
28
|
-
|
29
|
-
File "webdriver.py", line 24, in <module>
|
30
|
-
|
31
|
-
|
27
|
+
driver.find_element_by_xpath(".//span[contains(text(), 'is unknown')]").click()
|
32
|
-
|
33
|
-
AttributeError: 'list' object has no attribute 'click'
|
34
28
|
|
35
29
|
```
|
36
30
|
|
37
|
-
|
31
|
+
```
|
38
32
|
|
33
|
+
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":".//span[contains(text(), 'is unknown')]"}
|
34
|
+
|
35
|
+
```
|
36
|
+
|
39
|
-
|
37
|
+
要素が見つからないとのことです。。
|
40
38
|
|
41
39
|
|
42
40
|
|