File tree Expand file tree Collapse file tree 5 files changed +27
-8
lines changed
examples/python/tests/interactions
website_and_docs/content/documentation/webdriver/interactions Expand file tree Collapse file tree 5 files changed +27
-8
lines changed Original file line number Diff line number Diff line change 1+ import pytest
2+ from selenium import webdriver
3+ from selenium .webdriver .common .print_page_options import PrintOptions
4+
5+ pytest .fixture ()
6+ def driver ():
7+ driver = webdriver .Chrome ()
8+ yield driver
9+ driver .quit ()
10+
11+ def test_prints_page (driver ):
12+ driver .get ("https://www.selenium.dev/" )
13+ print_options = PrintOptions ()
14+ pdf = driver .print_page (print_options )
15+ assert len (pdf ) > 0
Original file line number Diff line number Diff line change @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
210210{{< tab header="Ruby" >}}
211211{{< badge-implementation >}}
212212{{< /tab >}}
213- {{< tab header="Python" >}}
214- {{< badge-code >}}
213+ {{% tab header="Python" %}}
214+ ** print_page()**
215+ {{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}}
215216{{< /tab >}}
216217{{< tab header="JavaScript" >}}
217218{{< badge-implementation >}}
Original file line number Diff line number Diff line change @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
210210{{< tab header="Ruby" >}}
211211{{< badge-implementation >}}
212212{{< /tab >}}
213- {{< tab header="Python" >}}
214- {{< badge-code >}}
213+ {{% tab header="Python" %}}
214+ ** print_page()**
215+ {{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}}
215216{{< /tab >}}
216217{{< tab header="JavaScript" >}}
217218{{< badge-implementation >}}
Original file line number Diff line number Diff line change @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
210210{{< tab header="Ruby" >}}
211211{{< badge-implementation >}}
212212{{< /tab >}}
213- {{< tab header="Python" >}}
214- {{< badge-code >}}
213+ {{% tab header="Python" %}}
214+ ** print_page()**
215+ {{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}}
215216{{< /tab >}}
216217{{< tab header="JavaScript" >}}
217218{{< badge-implementation >}}
Original file line number Diff line number Diff line change @@ -210,8 +210,9 @@ Note: `BrowsingContext()` is part of Selenium's BiDi implementation. To enable B
210210{{< tab header="Ruby" >}}
211211{{< badge-implementation >}}
212212{{< /tab >}}
213- {{< tab header="Python" >}}
214- {{< badge-code >}}
213+ {{% tab header="Python" %}}
214+ ** print_page()**
215+ {{< gh-codeblock path="examples/python/tests/interactions/test_prints_page.py#L11-L15" >}}
215216{{< /tab >}}
216217{{< tab header="JavaScript" >}}
217218{{< badge-implementation >}}
You can’t perform that action at this time.
0 commit comments