File tree Expand file tree Collapse file tree 5 files changed +22
-12
lines changed
examples/python/tests/browsers
website_and_docs/content/documentation/webdriver/browsers Expand file tree Collapse file tree 5 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -141,3 +141,13 @@ def test_full_page_screenshot(firefox_driver):
141
141
assert os .path .exists ("full_page_screenshot.png" )
142
142
143
143
driver .quit ()
144
+
145
+
146
+ def test_set_context (firefox_driver ):
147
+ driver = firefox_driver
148
+
149
+ with driver .context (driver .CONTEXT_CHROME ):
150
+ driver .execute_script ("console.log('Inside Chrome context');" )
151
+
152
+ # Check if the context is back to content
153
+ assert driver .execute ("GET_CONTEXT" )["value" ] == "content"
Original file line number Diff line number Diff line change @@ -443,9 +443,9 @@ please refer to the
443
443
{{< tab header="Java" >}}
444
444
{{< badge-code >}}
445
445
{{< /tab >}}
446
- {{% tab header="Python" % }}
447
- {{< badge-code >}}
448
- {{% /tab % }}
446
+ {{< tab header="Python" > }}
447
+ {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
448
+ {{< /tab > }}
449
449
{{< tab header="CSharp" >}}
450
450
{{< badge-code >}}
451
451
{{< /tab >}}
Original file line number Diff line number Diff line change @@ -439,9 +439,9 @@ IDはアドオンインストール時の戻り値から取得できます。
439
439
{{< tab header="Java" >}}
440
440
{{< badge-code >}}
441
441
{{< /tab >}}
442
- {{% tab header="Python" % }}
443
- {{< badge-code >}}
444
- {{% /tab % }}
442
+ {{< tab header="Python" > }}
443
+ {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
444
+ {{< /tab > }}
445
445
{{< tab header="CSharp" >}}
446
446
{{< badge-code >}}
447
447
{{< /tab >}}
Original file line number Diff line number Diff line change @@ -448,9 +448,9 @@ please refer to the
448
448
{{< tab header="Java" >}}
449
449
{{< badge-code >}}
450
450
{{< /tab >}}
451
- {{% tab header="Python" % }}
452
- {{< badge-code >}}
453
- {{% /tab % }}
451
+ {{< tab header="Python" > }}
452
+ {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
453
+ {{< /tab > }}
454
454
{{< tab header="CSharp" >}}
455
455
{{< badge-code >}}
456
456
{{< /tab >}}
Original file line number Diff line number Diff line change @@ -445,9 +445,9 @@ please refer to the
445
445
{{< tab header="Java" >}}
446
446
{{< badge-code >}}
447
447
{{< /tab >}}
448
- {{% tab header="Python" % }}
449
- {{< badge-code >}}
450
- {{% /tab % }}
448
+ {{< tab header="Python" > }}
449
+ {{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
450
+ {{< /tab > }}
451
451
{{< tab header="CSharp" >}}
452
452
{{< badge-code >}}
453
453
{{< /tab >}}
You can’t perform that action at this time.
0 commit comments