質問編集履歴
2
submitElement = driver.find_element(:css, 'svg')
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
# name属性にbtnGが設定されている要素を取得
|
68
68
|
|
69
|
-
submitElement = driver.find_element(:
|
69
|
+
submitElement = driver.find_element(:css, 'svg')
|
70
70
|
|
71
71
|
|
72
72
|
|
1
大きな編集
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
グーグル検索ボタンのElementがどこか分かりません
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
現在、下記のサイトを参考に、Seleniumでスクリーンショットを取ろうとしてい
|
5
|
+
現在、下記のサイトを参考に、Seleniumでスクリーンショットを取ろうとしています。
|
6
6
|
|
7
7
|
|
8
8
|
|
@@ -10,19 +10,13 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
cd desktop
|
14
|
-
|
15
|
-
touch test.rb
|
16
|
-
|
17
|
-
から下記の通り編集後
|
18
|
-
|
19
|
-
ruby test.rb
|
20
|
-
|
21
|
-
と
|
13
|
+
検証から検索ボタンの要素を探そうとしているのですが、どこがそれなのか分かりません。
|
22
14
|
|
23
15
|
|
24
16
|
|
17
|
+
|
18
|
+
|
25
|
-
|
19
|
+
![イメージ説明](cfacb8f9f55f18223903881c3122e284.png)
|
26
20
|
|
27
21
|
|
28
22
|
|
@@ -94,76 +88,8 @@
|
|
94
88
|
|
95
89
|
```
|
96
90
|
|
91
|
+
```
|
97
92
|
|
98
|
-
|
99
|
-
ターミナル内の表示
|
100
|
-
|
101
|
-
```Terminal
|
102
|
-
|
103
|
-
Traceback (most recent call last):
|
104
|
-
|
105
|
-
30: from test.rb:16:in `<main>'
|
106
|
-
|
107
|
-
29: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/search_context.rb:62:in `find_element'
|
108
|
-
|
109
|
-
28: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:547:in `find_element_by'
|
110
|
-
|
111
|
-
27: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:567:in `execute'
|
112
|
-
|
113
|
-
26: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/bridge.rb:167:in `execute'
|
114
|
-
|
115
|
-
25: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:64:in `call'
|
116
|
-
|
117
|
-
24: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/default.rb:114:in `request'
|
118
|
-
|
119
|
-
23: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:88:in `create_response'
|
120
|
-
|
121
|
-
22: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:88:in `new'
|
122
|
-
|
123
|
-
21: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
|
124
|
-
|
125
|
-
20: from /Library/Ruby/Gems/2.6.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/response.rb:72:in `assert_ok'
|
126
|
-
|
127
|
-
19: from 19 libsystem_pthread.dylib 0x00007fff2031247b thread_start + 15
|
128
|
-
|
129
|
-
18: from 18 libsystem_pthread.dylib 0x00007fff20316950 _pthread_start + 224
|
130
|
-
|
131
|
-
17: from 17 chromedriver 0x0000000104b1e3b3 chromedriver + 2532275
|
132
|
-
|
133
|
-
16: from 16 chromedriver 0x0000000104b0cf89 chromedriver + 2461577
|
134
|
-
|
135
|
-
15: from 15 chromedriver 0x0000000104adf4f9 chromedriver + 2274553
|
136
|
-
|
137
|
-
14: from 14 chromedriver 0x0000000104af6a91 chromedriver + 2370193
|
138
|
-
|
139
|
-
13: from 13 chromedriver 0x0000000104ad123b chromedriver + 2216507
|
140
|
-
|
141
|
-
12: from 12 chromedriver 0x0000000104af6150 chromedriver + 2367824
|
142
|
-
|
143
|
-
11: from 11 chromedriver 0x0000000104af653f chromedriver + 2368831
|
144
|
-
|
145
|
-
10: from 10 chromedriver 0x0000000104aea429 chromedriver + 2319401
|
146
|
-
|
147
|
-
9: from 9 chromedriver 0x00000001048cffc7 chromedriver + 114631
|
148
|
-
|
149
|
-
8: from 8 chromedriver 0x00000001048cf00a chromedriver + 110602
|
150
|
-
|
151
|
-
7: from 7 chromedriver 0x00000001048f5e23 chromedriver + 269859
|
152
|
-
|
153
|
-
6: from 6 chromedriver 0x0000000104904a96 chromedriver + 330390
|
154
|
-
|
155
|
-
5: from 5 chromedriver 0x00000001048f5b5d chromedriver + 269149
|
156
|
-
|
157
|
-
4: from 4 chromedriver 0x0000000104906834 chromedriver + 337972
|
158
|
-
|
159
|
-
3: from 3 chromedriver 0x00000001048d9d37 chromedriver + 154935
|
160
|
-
|
161
|
-
2: from 2 chromedriver 0x0000000104953623 chromedriver + 652835
|
162
|
-
|
163
|
-
1: from 1 chromedriver 0x0000000105185743 chromedriver + 9246531
|
164
|
-
|
165
|
-
0 chromedriver 0x0000000104b18d79 chromedriver + 2510201: no such element: Unable to locate element: {"method":"css selector","selector":"*[name='btnG']"} (Selenium::WebDriver::Error::NoSuchElementError)
|
166
|
-
|
167
|
-
(Session info: chrome=87.0.4280.141)
|
93
|
+
Selenium::WebDriver::Error::NoSuchElementError
|
168
94
|
|
169
95
|
```
|