I am trying to run an automated test and I am not getting the directory sitanxis. I have my directory path with / but in the error I get a backslash
Can you help me with a solution?
rutaDesc = "D:/Users/naisel.armenteros/Downloads"
class Test_DescFact(WebDriver):
def test_descFact(self):
driver = self.driver
self.driver.get(HomePage.get_base_url())
time.sleep(5)
home_page = HomePage(driver)
home_page.inicioSesion(userAdmin, passAdmin)
home_page.descReportFact(f_ini, f_fin)
pdf_file = None
time.sleep(2)
for filename in os.listdir(rutaDesc):
if filename.endswith(".pdf"):
pdf_file = os.path.join(rutaDesc, filename)
break
self.assertIsNotNone(pdf_file, "No se encontrĂ³ el archivo PDF")
os.system("start " + pdf_file)
El sistema no puede encontrar el archivo D:/Users/naisel.armenteros/Downloads\Reporte.
Ran 1 test in 59.055s
FAILED (errors=1)