From e830d588f1fc747b1d388470505022a0b8e52390 Mon Sep 17 00:00:00 2001 From: Simon Benzer Date: Sun, 13 Oct 2024 17:47:13 -0400 Subject: [PATCH 1/3] Added Python Examples for PrintOptions --- .../tests/interactions/test_print_options.py | 63 +++++++++++++++++++ .../webdriver/interactions/print_page.en.md | 25 +++----- .../webdriver/interactions/print_page.ja.md | 25 +++----- .../interactions/print_page.pt-br.md | 25 +++----- .../interactions/print_page.zh-cn.md | 25 +++----- 5 files changed, 95 insertions(+), 68 deletions(-) create mode 100644 examples/python/tests/interactions/test_print_options.py diff --git a/examples/python/tests/interactions/test_print_options.py b/examples/python/tests/interactions/test_print_options.py new file mode 100644 index 000000000000..26d0d6aeeae9 --- /dev/null +++ b/examples/python/tests/interactions/test_print_options.py @@ -0,0 +1,63 @@ +import pytest +from selenium import webdriver +from selenium.webdriver.common import PrintOptions, PageMargin + +@pytest.fixture() +def driver(): + driver = webdriver.Chrome() + yield driver + driver.quit() + +def test_orientation(driver): + driver.get("https://www.selenium.dev/") + print_options = PrintOptions() + print_options.set_orientation(PrintOptions.Orientation.LANDSCAPE) ## LANDSCAPE or PORTRAIT + current_orientation = print_options.get_orientation() + assert current_orientation == PrintOptions.Orientation.LANDSCAPE + +def test_range(driver): + driver.get("https://www.selenium.dev/") + print_options = PrintOptions() + print_options.set_page_ranges("1-3") + # print_options.set_page_ranges(["1", "2", "3"]) + current_range = print_options.get_page_ranges() + assert current_range == ["1", "2", "3"] + +def test_size(driver): + driver.get("https://www.selenium.dev/") + print_options = PrintOptions() + print_options.set_page_size("A4") ## A4, A3, A2, A1, A0, Letter, Legal, Tabloid + current_size = print_options.get_size() + assert current_size == "A4" + +def test_margin(driver): + driver.get("https://www.selenium.dev/") + margins = PageMargin(10, 10, 10, 10) # margins are in millimeters (mm) + print_options = PrintOptions() + print_options.set_page_margin(margins) + current_margin = print_options.get_page_margin() + assert current_margin.get_top() == 10 + assert current_margin.get_bottom() == 10 + assert current_margin.get_left() == 10 + assert current_margin.get_right() == 10 + +def test_scale(driver): + driver.get("https://www.selenium.dev/") + print_options = PrintOptions() + print_options.set_scale(0.5) ## 0.1 to 2.0 + current_scale = print_options.get_scale() + assert current_scale == 0.5 + +def test_background(driver): + driver.get("https://www.selenium.dev/") + print_options = PrintOptions() + print_options.set_background(True) ## True or False + current_background = print_options.get_background() + assert current_background is True + +def test_shrink_to_fit(driver): + driver.get("https://www.selenium.dev/") + print_options = PrintOptions() + print_options.set_shrink_to_fit(True) ## True or False + current_shrink_to_fit = print_options.get_shrink_to_fit() + assert current_shrink_to_fit is True \ 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 2edfd0d697d9..4fe39382817e 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 @@ -2,9 +2,7 @@ title: "Print Page" linkTitle: "Print Page" weight: 7 -aliases: [ -"/documentation/en/support_packages/print_page/", -] +aliases: ["/documentation/en/support_packages/print_page/"] --- Printing a website is a common requirement, whether for sharing information or archiving records. @@ -23,10 +21,9 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -48,10 +45,9 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -73,10 +69,9 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -98,10 +93,9 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -123,10 +117,9 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -148,10 +141,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -173,10 +165,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 f15d132ca30e..acb9bc054d93 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 @@ -2,9 +2,7 @@ title: "Print Page" linkTitle: "Print Page" weight: 7 -aliases: [ -"/documentation/ja/support_packages/print_page/", -] +aliases: ["/documentation/ja/support_packages/print_page/"] --- Printing a website is a common requirement, whether for sharing information or archiving records. @@ -23,10 +21,9 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -48,10 +45,9 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -73,10 +69,9 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -98,10 +93,9 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -123,10 +117,9 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -148,10 +141,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -173,10 +165,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 48bbccf8ed2b..9546edb7f35b 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 @@ -2,9 +2,7 @@ title: "Print Page" linkTitle: "Print Page" weight: 7 -aliases: [ -"/documentation/pt-br/support_packages/print_page/", -] +aliases: ["/documentation/pt-br/support_packages/print_page/"] --- Printing a website is a common requirement, whether for sharing information or archiving records. @@ -23,10 +21,9 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -48,10 +45,9 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -73,10 +69,9 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -98,10 +93,9 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -123,10 +117,9 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -148,10 +141,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -173,10 +165,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} 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 b22dcd54a1ff..1e434de60612 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 @@ -2,9 +2,7 @@ title: "Print Page" linkTitle: "Print Page" weight: 7 -aliases: [ -"/documentation/zh-cn/support_packages/print_page/", -] +aliases: ["/documentation/zh-cn/support_packages/print_page/"] --- Printing a website is a common requirement, whether for sharing information or archiving records. @@ -23,10 +21,9 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -48,10 +45,9 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -73,10 +69,9 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -98,10 +93,9 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -123,10 +117,9 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -148,10 +141,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} @@ -173,10 +165,9 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< /tab >}} {{< tab header="Ruby" >}} {{< badge-code >}} -{{< badge-code >}} {{< /tab >}} {{< tab header="Python" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} From d808dbda9764a833569aaf04adab1f84a3ed37d5 Mon Sep 17 00:00:00 2001 From: Simon Benzer Date: Sun, 13 Oct 2024 17:51:08 -0400 Subject: [PATCH 2/3] changed missing example badgecodes to implementation missing badge codes --- .../webdriver/interactions/print_page.en.md | 42 +++++++++---------- .../webdriver/interactions/print_page.ja.md | 42 +++++++++---------- .../interactions/print_page.pt-br.md | 42 +++++++++---------- .../interactions/print_page.zh-cn.md | 42 +++++++++---------- 4 files changed, 84 insertions(+), 84 deletions(-) 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 4fe39382817e..cf742f486fa4 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 @@ -20,16 +20,16 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -44,16 +44,16 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -68,16 +68,16 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -92,16 +92,16 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -116,16 +116,16 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -140,16 +140,16 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -164,15 +164,15 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} \ No newline at end of file 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 acb9bc054d93..c402e13fcad7 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 @@ -20,16 +20,16 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -44,16 +44,16 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -68,16 +68,16 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -92,16 +92,16 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -116,16 +116,16 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -140,16 +140,16 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -164,15 +164,15 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} \ No newline at end of file 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 9546edb7f35b..adb1be970e7f 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 @@ -20,16 +20,16 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -44,16 +44,16 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -68,16 +68,16 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -92,16 +92,16 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -116,16 +116,16 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -140,16 +140,16 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -164,15 +164,15 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} \ No newline at end of file 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 1e434de60612..b4cf51e39d7e 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 @@ -20,16 +20,16 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -44,16 +44,16 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -68,16 +68,16 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -92,16 +92,16 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -116,16 +116,16 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -140,16 +140,16 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} @@ -164,15 +164,15 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-code >}} {{< /tab >}} {{< tab header="Ruby" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} {{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< tab header="Kotlin" >}} -{{< badge-code >}} +{{< badge-implementation >}} {{< /tab >}} {{< /tabpane >}} \ No newline at end of file From 7b8b2260199b6cb708761c21cf596c132f969263 Mon Sep 17 00:00:00 2001 From: Simon Benzer Date: Tue, 15 Oct 2024 10:44:25 -0400 Subject: [PATCH 3/3] fixed tests --- .../tests/interactions/test_print_options.py | 47 +++++++++---------- .../webdriver/interactions/print_page.en.md | 14 +++--- .../webdriver/interactions/print_page.ja.md | 14 +++--- .../interactions/print_page.pt-br.md | 14 +++--- .../interactions/print_page.zh-cn.md | 14 +++--- 5 files changed, 49 insertions(+), 54 deletions(-) diff --git a/examples/python/tests/interactions/test_print_options.py b/examples/python/tests/interactions/test_print_options.py index 26d0d6aeeae9..8d2d9d722daa 100644 --- a/examples/python/tests/interactions/test_print_options.py +++ b/examples/python/tests/interactions/test_print_options.py @@ -1,6 +1,6 @@ import pytest from selenium import webdriver -from selenium.webdriver.common import PrintOptions, PageMargin +from selenium.webdriver.common.print_page_options import PrintOptions @pytest.fixture() def driver(): @@ -11,53 +11,48 @@ def driver(): def test_orientation(driver): driver.get("https://www.selenium.dev/") print_options = PrintOptions() - print_options.set_orientation(PrintOptions.Orientation.LANDSCAPE) ## LANDSCAPE or PORTRAIT - current_orientation = print_options.get_orientation() - assert current_orientation == PrintOptions.Orientation.LANDSCAPE + print_options.orientation = "landscape" ## landscape or portrait + assert print_options.orientation == "landscape" def test_range(driver): driver.get("https://www.selenium.dev/") print_options = PrintOptions() - print_options.set_page_ranges("1-3") - # print_options.set_page_ranges(["1", "2", "3"]) - current_range = print_options.get_page_ranges() - assert current_range == ["1", "2", "3"] + print_options.page_ranges = ["1-3"] ## ["1", "2", "3"] or ["1-3"] + assert print_options.page_ranges == ["1", "2", "3"] def test_size(driver): driver.get("https://www.selenium.dev/") print_options = PrintOptions() - print_options.set_page_size("A4") ## A4, A3, A2, A1, A0, Letter, Legal, Tabloid - current_size = print_options.get_size() - assert current_size == "A4" + print_options.scale = 0.5 ## 0.1 to 2.0`` + assert print_options.scale == 0.5 def test_margin(driver): driver.get("https://www.selenium.dev/") - margins = PageMargin(10, 10, 10, 10) # margins are in millimeters (mm) print_options = PrintOptions() - print_options.set_page_margin(margins) - current_margin = print_options.get_page_margin() - assert current_margin.get_top() == 10 - assert current_margin.get_bottom() == 10 - assert current_margin.get_left() == 10 - assert current_margin.get_right() == 10 + print_options.margin_top = 10 + print_options.margin_bottom = 10 + print_options.margin_left = 10 + print_options.margin_right = 10 + assert print_options.margin_top == 10 + assert print_options.margin_bottom == 10 + assert print_options.margin_left == 10 + assert print_options.margin_right == 10 def test_scale(driver): driver.get("https://www.selenium.dev/") print_options = PrintOptions() - print_options.set_scale(0.5) ## 0.1 to 2.0 - current_scale = print_options.get_scale() + print_options.scale = 0.5 ## 0.1 to 2.0 + current_scale = print_options.scale assert current_scale == 0.5 def test_background(driver): driver.get("https://www.selenium.dev/") print_options = PrintOptions() - print_options.set_background(True) ## True or False - current_background = print_options.get_background() - assert current_background is True + print_options.background = True ## True or False + assert print_options.background is True def test_shrink_to_fit(driver): driver.get("https://www.selenium.dev/") print_options = PrintOptions() - print_options.set_shrink_to_fit(True) ## True or False - current_shrink_to_fit = print_options.get_shrink_to_fit() - assert current_shrink_to_fit is True \ No newline at end of file + print_options.shrink_to_fit = True ## True or False + assert print_options.shrink_to_fit is True \ 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 cf742f486fa4..a0ea153103af 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 @@ -23,7 +23,7 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -47,7 +47,7 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L17-L21" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -71,7 +71,7 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L23-L27" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -95,7 +95,7 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L29-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -119,7 +119,7 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L41-L46" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -143,7 +143,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L48-L52" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -167,7 +167,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L54-L58" >}} {{< /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 c402e13fcad7..e1d20d67059e 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 @@ -23,7 +23,7 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -47,7 +47,7 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L17-L21" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -71,7 +71,7 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L23-L27" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -95,7 +95,7 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L29-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -119,7 +119,7 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L41-L46" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -143,7 +143,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L48-L52" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -167,7 +167,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L54-L58" >}} {{< /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 adb1be970e7f..e02cdd3c4cec 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 @@ -23,7 +23,7 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -47,7 +47,7 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L17-L21" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -71,7 +71,7 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L23-L27" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -95,7 +95,7 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L29-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -119,7 +119,7 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L41-L46" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -143,7 +143,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L48-L52" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -167,7 +167,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L54-L58" >}} {{< /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 b4cf51e39d7e..65e7c7b73e32 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 @@ -23,7 +23,7 @@ Using the `getOrientation()` and `setOrientation()` methods, you can get/set the {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L16" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L11-L15" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -47,7 +47,7 @@ Using the `getPageRanges()` and `setPageRanges()` methods, you can get/set the r {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L18-L24" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L17-L21" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -71,7 +71,7 @@ Using the `getPaperSize()` and `setPaperSize()` methods, you can get/set the pap {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L26-L31" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L23-L27" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -95,7 +95,7 @@ Using the `getPageMargin()` and `setPageMargin()` methods, you can set the margi {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L33-L424" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L29-L39" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -119,7 +119,7 @@ Using `getScale()` and `setScale()` methods, you can get/set the scale of the pa {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L44-L49" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L41-L46" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -143,7 +143,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether b {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L51-L56" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L48-L52" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}} @@ -167,7 +167,7 @@ Using `getBackground()` and `setBackground()` methods, you can get/set whether t {{< badge-implementation >}} {{< /tab >}} {{< tab header="Python" >}} -{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L58-L63" >}} +{{< gh-codeblock path="examples/python/tests/interactions/test_print_options.py#L54-L58" >}} {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-implementation >}}