Skip to content

Commit a12473d

Browse files
changes for demo
1 parent 3ed1b9e commit a12473d

File tree

3 files changed

+52
-31
lines changed

3 files changed

+52
-31
lines changed

examples/python/tests/interactions/test_frames.py

+2
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@
5151

5252
#quit the driver
5353
driver.quit()
54+
55+
#live demo preparation

website_and_docs/content/documentation/webdriver/interactions/frames.ja.md

+17-10
Original file line numberDiff line numberDiff line change
@@ -147,27 +147,34 @@ driver.findElement(By.tagName("button")).click()
147147
JavaScriptの _window.frames_ を使用して照会できるように、Frameのインデックスを使用することもできます。
148148

149149
{{< tabpane langEqualsHeader=true >}}
150-
{{< tab header="Java" text=true >}}
150+
{{< tab header="Java" text=true >}}
151151
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L62-L63" >}}
152-
{{< /tab >}}
152+
{{< /tab >}}
153+
153154
{{< tab header="Python" text=true >}}
154155
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L45-L46" >}}
155156
{{< /tab >}}
156-
{{< tab header="Ruby" >}}
157-
# Switch to the second frame
157+
158+
159+
{{< tab header="Ruby" >}}
160+
# Switch to the second frame
158161
driver.switch_to.frame(1)
159-
{{< /tab >}}
160-
{{< tab header="CSharp" text=true >}}
162+
{{< /tab >}}
163+
{{< tab header="CSharp" text=true >}}
161164
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L62-L63" >}}
162165
{{< /tab >}}
163-
{{< tab header="JavaScript" >}}
166+
{{< tab header="Python" text=true >}}
167+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L49-L50" >}}
168+
{{< /tab >}}
169+
170+
{{< tab header="JavaScript" >}}
164171
// Switches to the second frame
165172
await driver.switchTo().frame(1);
166-
{{< /tab >}}
167-
{{< tab header="Kotlin" >}}
173+
{{< /tab >}}
174+
{{< tab header="Kotlin" >}}
168175
// Switches to the second frame
169176
driver.switchTo().frame(1)
170-
{{< /tab >}}
177+
{{< /tab >}}
171178
{{< /tabpane >}}
172179

173180

website_and_docs/content/documentation/webdriver/interactions/frames.pt-br.md

+33-21
Original file line numberDiff line numberDiff line change
@@ -162,27 +162,37 @@ Também é possível usar o índice do frame, podendo ser
162162
consultado usando _window.frames_ em JavaScript.
163163

164164
{{< tabpane langEqualsHeader=true >}}
165-
{{< tab header="Java" text=true >}}
165+
{{< tab header="Java" text=true >}}
166166
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L62-L63" >}}
167-
{{< /tab >}}
167+
{{< /tab >}}
168+
168169
{{< tab header="Python" text=true >}}
169170
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L45-L46" >}}
170171
{{< /tab >}}
171-
{{< tab header="Ruby" >}}
172-
# Switch to the second frame
172+
173+
174+
{{< tab header="Ruby" >}}
175+
# Switch to the second frame
173176
driver.switch_to.frame(1)
174-
{{< /tab >}}
175-
{{< tab header="CSharp" text=true >}}
177+
{{< /tab >}}
178+
{{< tab header="CSharp" text=true >}}
176179
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L62-L63" >}}
177180
{{< /tab >}}
178-
{{< tab header="JavaScript" >}}
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" >}}
179189
// Switches to the second frame
180190
await driver.switchTo().frame(1);
181-
{{< /tab >}}
182-
{{< tab header="Kotlin" >}}
191+
{{< /tab >}}
192+
{{< tab header="Kotlin" >}}
183193
// Switches to the second frame
184194
driver.switchTo().frame(1)
185-
{{< /tab >}}
195+
{{< /tab >}}
186196
{{< /tabpane >}}
187197

188198

@@ -192,25 +202,27 @@ Para deixar um iframe ou frameset, volte para o conteúdo padrão
192202
como a seguir:
193203

194204
{{< tabpane langEqualsHeader=true >}}
195-
{{< tab header="Java" text=true >}}
205+
{{< tab header="Java" text=true >}}
196206
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L66-L67" >}}
197-
{{< /tab >}}
198-
{{< tab header="Python" text=true >}}
207+
{{< /tab >}}
208+
209+
{{< tab header="Python" text=true >}}
199210
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L49-L50" >}}
200211
{{< /tab >}}
201-
{{< tab header="CSharp" text=true >}}
212+
213+
{{< tab header="CSharp" text=true >}}
202214
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L66-L67" >}}
203215
{{< /tab >}}
204-
{{< tab header="Ruby" >}}
205-
# Return to the top level
216+
{{< tab header="Ruby" >}}
217+
# Return to the top level
206218
driver.switch_to.default_content
207-
{{< /tab >}}
208-
{{< tab header="JavaScript" >}}
219+
{{< /tab >}}
220+
{{< tab header="JavaScript" >}}
209221
// Return to the top level
210222
await driver.switchTo().defaultContent();
211-
{{< /tab >}}
212-
{{< tab header="Kotlin" >}}
223+
{{< /tab >}}
224+
{{< tab header="Kotlin" >}}
213225
// Return to the top level
214226
driver.switchTo().defaultContent()
215-
{{< /tab >}}
227+
{{< /tab >}}
216228
{{< /tabpane >}}

0 commit comments

Comments
 (0)