Answer the question
In order to leave comments, you need to log in
How to concatenate date and screenshot name?
The screenshot is not taken or saved, there are no errors in the console:
browser = webdriver.Chrome(executable_path=r'C:\chromedriver.exe')
(какой-то код)
get_date = str(time.strftime('%d.%m.%Y %H:%M:%S', time.localtime(time.time())))
screenshot_name = "C:/UI_tests/Screenshots/" + get_date + "-screenshot.png"
screenshot = browser.get_screenshot_as_file(screenshot_name)
browser = webdriver.Chrome(executable_path=r'C:\chromedriver.exe')
(какой-то код)
screenshot = browser.get_screenshot_as_file("C:/UI_tests/Screenshots/-screenshot.png")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question