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):
141141 assert os .path .exists ("full_page_screenshot.png" )
142142
143143 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
443443{{< tab header="Java" >}}
444444{{< badge-code >}}
445445{{< /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 > }}
449449{{< tab header="CSharp" >}}
450450{{< badge-code >}}
451451{{< /tab >}}
Original file line number Diff line number Diff line change @@ -439,9 +439,9 @@ IDはアドオンインストール時の戻り値から取得できます。
439439{{< tab header="Java" >}}
440440{{< badge-code >}}
441441{{< /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 > }}
445445{{< tab header="CSharp" >}}
446446{{< badge-code >}}
447447{{< /tab >}}
Original file line number Diff line number Diff line change @@ -448,9 +448,9 @@ please refer to the
448448{{< tab header="Java" >}}
449449{{< badge-code >}}
450450{{< /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 > }}
454454{{< tab header="CSharp" >}}
455455{{< badge-code >}}
456456{{< /tab >}}
Original file line number Diff line number Diff line change @@ -445,9 +445,9 @@ please refer to the
445445{{< tab header="Java" >}}
446446{{< badge-code >}}
447447{{< /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 > }}
451451{{< tab header="CSharp" >}}
452452{{< badge-code >}}
453453{{< /tab >}}
You can’t perform that action at this time.
0 commit comments