@@ -49,7 +49,7 @@ window is launched. So first position will be default browser, and so on.
4949{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L22-L29" >}}
5050{{< /tab >}}
5151 {{< tab header="Python" text=true >}}
52- {{< gh-codeblock path="/examples/python/tests/interactions/test_windows.py#L22-L32 " >}}
52+ {{< gh-codeblock path="/examples/python/tests/interactions/test_windows.py#L22-L30 " >}}
5353 {{< /tab >}}
5454
5555 {{< tab header="CSharp" text=true >}}
@@ -148,12 +148,8 @@ handle stored in a variable. Put this together and you will get:
148148 {{< tab header="Java" text=true >}}
149149{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L31-L34" >}}
150150{{< /tab >}}
151- {{< tab header="Python" >}}
152- #Close the tab or window
153- driver.close()
154-
155- #Switch back to the old tab or window
156- driver.switch_to.window(original_window)
151+ {{< tab header="Python" text=true >}}
152+ {{< gh-codeblock path="/examples/python/tests/interactions/test_windows.py#L35-L35" >}}
157153 {{< /tab >}}
158154
159155 {{< tab header="CSharp" text=true >}}
@@ -202,12 +198,8 @@ __Note: This feature works with Selenium 4 and later versions.__
202198 {{< tab header="Java" text=true >}}
203199{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L36-L42" >}}
204200{{< /tab >}}
205- {{< tab header="Python" >}}
206- # Opens a new tab and switches to new tab
207- driver.switch_to.new_window('tab')
208-
209- # Opens a new window and switches to new window
210- driver.switch_to.new_window('window')
201+ {{< tab header="Python" text=true >}}
202+ {{< gh-codeblock path="/examples/python/tests/interactions/test_windows.py#L40-L43" >}}
211203 {{< /tab >}}
212204
213205
@@ -250,7 +242,9 @@ instead of close:
250242 {{< tab header="Java" text=true >}}
251243{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/interactions/WindowsTest.java#L44-L45" >}}
252244{{< /tab >}}
253- {{< tab header="Python" >}}driver.quit(){{< /tab >}}
245+ {{< tab header="Python" text=true >}}
246+ {{< gh-codeblock path="/examples/python/tests/interactions/test_windows.py#L13-L13" >}}
247+ {{< /tab >}}
254248
255249 {{< tab header="CSharp" text=true >}}
256250 {{< gh-codeblock path="/examples/dotnet/SeleniumDocs/Interactions/WindowsTest.cs#L45-L46" >}}
0 commit comments