Selenium Python - Advanced Patterns
Given this Selenium Python code snippet, what will be the output if the file is downloaded successfully?
import os
from selenium import webdriver
options = webdriver.FirefoxOptions()
profile = webdriver.FirefoxProfile()
profile.set_preference('browser.download.folderList', 2)
profile.set_preference('browser.download.dir', '/tmp/downloads')
profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'application/pdf')
driver = webdriver.Firefox(firefox_profile=profile, options=options)
driver.get('http://example.com/sample.pdf')
file_path = '/tmp/downloads/sample.pdf'
print(os.path.exists(file_path))