-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Python Example to PrintPage Documentation (#2009)[deploy site]
Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters