@@ -162,37 +162,27 @@ Também é possível usar o índice do frame, podendo ser
162
162
consultado usando _ window.frames_ em JavaScript.
163
163
164
164
{{< tabpane langEqualsHeader=true >}}
165
- {{< tab header="Java" text=true >}}
165
+ {{< tab header="Java" text=true >}}
166
166
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L62-L63" >}}
167
- {{< /tab >}}
168
-
167
+ {{< /tab >}}
169
168
{{< tab header="Python" text=true >}}
170
169
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L45-L46" >}}
171
170
{{< /tab >}}
172
-
173
-
174
- {{< tab header="Ruby" >}}
175
- # Switch to the second frame
171
+ {{< tab header="Ruby" >}}
172
+ # Switch to the second frame
176
173
driver.switch_to.frame(1)
177
- {{< /tab >}}
178
- {{< tab header="CSharp" text=true >}}
174
+ {{< /tab >}}
175
+ {{< tab header="CSharp" text=true >}}
179
176
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L62-L63" >}}
180
177
{{< /tab >}}
181
- {{< tab header="Python" >}}
182
- # switching to second iframe based on index
183
- iframe = driver.find_elements(By.TAG_NAME,'iframe')[ 1]
184
-
185
- # switch to selected iframe
186
- driver.switch_to.frame(iframe)
187
- {{< /tab >}}
188
- {{< tab header="JavaScript" >}}
178
+ {{< tab header="JavaScript" >}}
189
179
// Switches to the second frame
190
180
await driver.switchTo().frame(1);
191
- {{< /tab >}}
192
- {{< tab header="Kotlin" >}}
181
+ {{< /tab >}}
182
+ {{< tab header="Kotlin" >}}
193
183
// Switches to the second frame
194
184
driver.switchTo().frame(1)
195
- {{< /tab >}}
185
+ {{< /tab >}}
196
186
{{< /tabpane >}}
197
187
198
188
@@ -202,27 +192,25 @@ Para deixar um iframe ou frameset, volte para o conteúdo padrão
202
192
como a seguir:
203
193
204
194
{{< tabpane langEqualsHeader=true >}}
205
- {{< tab header="Java" text=true >}}
195
+ {{< tab header="Java" text=true >}}
206
196
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L66-L67" >}}
207
- {{< /tab >}}
208
-
209
- {{< tab header="Python" text=true >}}
197
+ {{< /tab >}}
198
+ {{< tab header="Python" text=true >}}
210
199
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L49-L50" >}}
211
200
{{< /tab >}}
212
-
213
- {{< tab header="CSharp" text=true >}}
201
+ {{< tab header="CSharp" text=true >}}
214
202
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L66-L67" >}}
215
203
{{< /tab >}}
216
- {{< tab header="Ruby" >}}
217
- # Return to the top level
204
+ {{< tab header="Ruby" >}}
205
+ # Return to the top level
218
206
driver.switch_to.default_content
219
- {{< /tab >}}
220
- {{< tab header="JavaScript" >}}
207
+ {{< /tab >}}
208
+ {{< tab header="JavaScript" >}}
221
209
// Return to the top level
222
210
await driver.switchTo().defaultContent();
223
- {{< /tab >}}
224
- {{< tab header="Kotlin" >}}
211
+ {{< /tab >}}
212
+ {{< tab header="Kotlin" >}}
225
213
// Return to the top level
226
214
driver.switchTo().defaultContent()
227
- {{< /tab >}}
215
+ {{< /tab >}}
228
216
{{< /tabpane >}}
0 commit comments