Let me explain a little bit of my code. Bot goes to a website to download files under attachment and under image scan, here are the scenarios that can happen:
Scenario 1: Attachment 1 exists, Attachment 2 exists, Image Scan exists
Scenario 2: Attachment 1 does not exist, Attachment 2 does not exist, Image Scan exists
Scenario 3: Attachment 1 exists, Attachment 2 does not exists, Image Scan does not exists
Scenario 4: Attachment 1 exists, Attachment 2 exists, Image Scan does not exists
Scenario 5: Attachment 1 exists, Attachment 2 does not exists, Image Scan exists
Scenario 6: Attachment 1 does not exist, Attachment 2 does not exist, Image Scan does not exist
Scenario 6, the bot needs to save the whole page as PDF, since there is no file to download. Scenario 2 is what I need help. If the file is a jpg, I need the bot to save the page as PDF, instead of saving the jpg file, but the code I have, the bot keeps downloading the jpg file. This is the condition I have
If there is no attachment but there is an image scan that does not contain .jpg, save the file
If there is no attachment and the image scan contains .jpg, save as pdf
Any ideas what I am doing wrong? This is my first automation
If the attachment is jpg, I want to save the page as PDF, not click and download the file. Right now, the bot is downloading the file instead of saving the page as PDF.
So one scenario is image scan is anything besides jpg (pdf, excel, email) than we download the file. The other scenario is image scan is jpg, so we save page as pdf.