Skip to content

Commit ec46eaf

Browse files
committed
add utf encoding
1 parent 9d707b1 commit ec46eaf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

conftest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from selenium.webdriver import Firefox
1212
from selenium.webdriver.firefox.options import Options
1313

14-
# pipenv run pytest --fx-executable ./firefox/firefox -n 4 .
15-
1614

1715
def screenshot_content(driver: Firefox, opt_ci: bool, test_name: str) -> None:
1816
"""
@@ -39,13 +37,13 @@ def log_content(opt_ci: bool, driver: Firefox, test_name: str) -> None:
3937
)
4038

4139
# Save Chrome context page source
42-
with open(fullpath_chrome, "w") as fh:
40+
with open(fullpath_chrome, "w", encoding="utf-8") as fh:
4341
with driver.context(driver.CONTEXT_CHROME):
4442
output_contents = driver.page_source
4543
fh.write(output_contents)
4644

4745
# Save Content context page source
48-
with open(fullpath_content, "w") as fh:
46+
with open(fullpath_content, "w", encoding="utf-8") as fh:
4947
output_contents = driver.page_source
5048
fh.write(output_contents)
5149
return

0 commit comments

Comments
 (0)