I am having issues with my code. My bot needs to go to this website and check if there are attachments and image scan. If yes, than we download, if no, we print the whole page.
First I am checking if the first attachment exists
If there is a first attachment, I am using an if condition of: If the name of the first attachment is not equal to the name of the image scan, and the name of the second attachment is not equal to the name of the image scan, download the first attachment. (This seems to not me working either, since it is downloading everything even if it has the same name)
If the second attachment exists, download it and then check if image scan exists and if exists, download it, if second attachment does not exist, check if the image scan exists
The problem I think I am facing is that the bot is downloading the first attachment that has a different name from the image scan, and there is no second attachment. I think it keeps looking for the second attachment.
While indicating the element you would see the strict selector fuzzy etc…check if there are any id or any numbers in it which might change and remove them and add reliable ones
Choose the attributes of the selectors right to avoid the exception.
Suggestion:
Use aaname as the top priority. It will help in identifying the selected element appropriately.
avoid choosing the number from the attribute list [Id=‘234H6Ur’ or idx=‘1’]
choose the attribute that gives the meaning of the element you scrapped. [Ex: If you choose the SignIn button, the attribute you choose should contain signin keyword to justify the attribute.