Skip to content

Commit 221798f

Browse files
authored
[py]: Add firefox python full page screenshot example (#2048)[deploy site]
* Add firefox python full page screenshot example * update line number for tests
1 parent 664555a commit 221798f

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

examples/python/tests/browsers/test_firefox.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,15 @@ def test_install_unsigned_addon_directory_slash(firefox_driver, addon_path_dir_s
129129
injected = driver.find_element(webdriver.common.by.By.ID, "webextensions-selenium-example")
130130

131131
assert injected.text == "Content injected by webextensions-selenium-example"
132+
133+
134+
def test_full_page_screenshot(firefox_driver):
135+
driver = firefox_driver
136+
137+
driver.get("https://www.selenium.dev")
138+
139+
driver.save_full_page_screenshot("full_page_screenshot.png")
140+
141+
assert os.path.exists("full_page_screenshot.png")
142+
143+
driver.quit()

website_and_docs/content/documentation/webdriver/browsers/firefox.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ please refer to the
416416
{{< tab header="Java" >}}
417417
{{< badge-code >}}
418418
{{< /tab >}}
419-
{{% tab header="Python" %}}
420-
{{< badge-code >}}
421-
{{% /tab %}}
419+
{{< tab header="Python" >}}
420+
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}}
421+
{{< /tab >}}
422422
{{< tab header="CSharp" >}}
423423
{{< badge-code >}}
424424
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,9 @@ IDはアドオンインストール時の戻り値から取得できます。
414414
{{< tab header="Java" >}}
415415
{{< badge-code >}}
416416
{{< /tab >}}
417-
{{% tab header="Python" %}}
418-
{{< badge-code >}}
419-
{{% /tab %}}
417+
{{< tab header="Python" >}}
418+
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}}
419+
{{< /tab >}}
420420
{{< tab header="CSharp" >}}
421421
{{< badge-code >}}
422422
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ please refer to the
421421
{{< tab header="Java" >}}
422422
{{< badge-code >}}
423423
{{< /tab >}}
424-
{{% tab header="Python" %}}
425-
{{< badge-code >}}
426-
{{% /tab %}}
424+
{{< tab header="Python" >}}
425+
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}}
426+
{{< /tab >}}
427427
{{< tab header="CSharp" >}}
428428
{{< badge-code >}}
429429
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ please refer to the
418418
{{< tab header="Java" >}}
419419
{{< badge-code >}}
420420
{{< /tab >}}
421-
{{% tab header="Python" %}}
422-
{{< badge-code >}}
423-
{{% /tab %}}
421+
{{< tab header="Python" >}}
422+
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L139" >}}
423+
{{< /tab >}}
424424
{{< tab header="CSharp" >}}
425425
{{< badge-code >}}
426426
{{< /tab >}}

0 commit comments

Comments
 (0)