diff --git a/examples/python/tests/interactions/test_prints_page.py b/examples/python/tests/interactions/test_prints_page.py new file mode 100644 index 000000000000..2735e4228fc2 --- /dev/null +++ b/examples/python/tests/interactions/test_prints_page.py @@ -0,0 +1,15 @@ +import pytest +from selenium import webdriver +from selenium.webdriver.common.print_page_options import PrintOptions + +pytest.fixture() +def driver(): + driver = webdriver.Chrome() + yield driver + driver.quit() + +def test_prints_page(driver): + driver.get("https://www.selenium.dev/") + print_options = PrintOptions() + pdf = driver.print_page(print_options) + assert len(pdf) > 0 \ No newline at end of file diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md index 37277550a7bc..c9f160ceed03 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.en.md @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< tab header="Ruby" >}} {{< badge-implementation >}} {{< /tab >}} -{{< tab header="Python" >}} -{{< badge-code >}} +{{% tab header="Python" %}} +**print_page()** +{{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md index 25fd68d99315..dacc73ad9b68 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.ja.md @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< tab header="Ruby" >}} {{< badge-implementation >}} {{< /tab >}} -{{< tab header="Python" >}} -{{< badge-code >}} +{{% tab header="Python" %}} +**print_page()** +{{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md index f172d2538658..59c05c42ff85 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.pt-br.md @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< tab header="Ruby" >}} {{< badge-implementation >}} {{< /tab >}} -{{< tab header="Python" >}} -{{< badge-code >}} +{{% tab header="Python" %}} +**print_page()** +{{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md b/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md index a5383bd7dcce..0268055e33e7 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B {{< tab header="Ruby" >}} {{< badge-implementation >}} {{< /tab >}} -{{< tab header="Python" >}} -{{< badge-code >}} +{{% tab header="Python" %}} +**print_page()** +{{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}}