htmlcmp 1.2.1__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/PKG-INFO +1 -1
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/pyproject.toml +1 -1
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp/html_render_diff.py +1 -12
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp.egg-info/PKG-INFO +1 -1
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/README.md +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/setup.cfg +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp/__init__.py +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp/common.py +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp/compare_output.py +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp/compare_output_server.py +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp/tidy_output.py +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp.egg-info/SOURCES.txt +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp.egg-info/dependency_links.txt +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp.egg-info/entry_points.txt +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp.egg-info/requires.txt +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/src/htmlcmp.egg-info/top_level.txt +0 -0
- {htmlcmp-1.2.1 → htmlcmp-1.2.2}/tests/test_html_render_diff.py +0 -0
|
@@ -36,13 +36,6 @@ def screenshot(browser: webdriver.Remote, url: str) -> Image.Image:
|
|
|
36
36
|
|
|
37
37
|
target_find_by = By.TAG_NAME
|
|
38
38
|
target = "body"
|
|
39
|
-
loaded_page_settling_time = 0
|
|
40
|
-
|
|
41
|
-
# Selenium doesn't like when we try to screenshot <body> element of documents generated by pdf2htmlEX
|
|
42
|
-
if "poppler" in url:
|
|
43
|
-
target_find_by = By.ID
|
|
44
|
-
target = "page-container"
|
|
45
|
-
loaded_page_settling_time = 1
|
|
46
39
|
|
|
47
40
|
web_driver_wait = WebDriverWait(browser, 5)
|
|
48
41
|
web_driver_wait.until(
|
|
@@ -51,12 +44,8 @@ def screenshot(browser: webdriver.Remote, url: str) -> Image.Image:
|
|
|
51
44
|
web_driver_wait.until(
|
|
52
45
|
lambda driver: driver.execute_script("return document.readyState") == "complete"
|
|
53
46
|
)
|
|
54
|
-
if loaded_page_settling_time != 0:
|
|
55
|
-
time.sleep(loaded_page_settling_time)
|
|
56
|
-
|
|
57
|
-
target_element = browser.find_element(target_find_by, target)
|
|
58
47
|
|
|
59
|
-
png =
|
|
48
|
+
png = browser.get_screenshot_as_png()
|
|
60
49
|
return Image.open(io.BytesIO(png))
|
|
61
50
|
|
|
62
51
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|