Sorry for asking this question which may sound silly, but I am a beginner and I am pretty stuck here.
I have made a script in Python that does screenshots at a certain moment using Selenium library. All this thing is in a for loop and every screenshot has a different filename. So, the problem is that when Python gets to the line meant to save the file to a specific location, the screenshot doesnt't get saved because the extension gets on a new line after the file name.
The code is the following:
screenshot = 'D:\\SCREENSHOTS\\' + filename + '.png'
driver.get_screenshot_as_file(screenshot)
The output is the following:
D:\SCREENSHOTS\filename
.png
How can I put .png on the same line right after filename?
Thank you in advance!