Goal: I want to go to a website, download images from a gallery one by one and then saving them on a local folder
Workflow I’ve done inside a sequence:
An input dialog that asks me how many images I want to download. My answer is stored in a variable called number
An open browser activity that goes directly to the first image of the provided gallery of the website
Inside a Do activity I’ve:
3.1. An Assign activity with a variable called val with the default value of 0
3.2. A Do While acvity with another sequence:
3.2.1. A Take Screenshot activity
3.2.2. A Save Image activity
3.2.3. A Click activity (that clicks on the Next button of the gallery to go to another page and get another image)
obs: The Do While condition is val < CInt(number)
Sounds like a simple workflow. However, here’s what happens: For example, if I answer that I will want to download 6 images. The first one works good, the second one works good and between the third and the fifth, the selector behaves weird. He makes some sort of zoom into the second picture of the gallery. All of sudden, the 6th and final picture gets download and saved again normally. At the second image, he doesn’t takes the screenshot of the area I wanted. He basically clicks the image and gets me the full resolution image.
I also get a Worfklow Exception that says:
“Main has thrown an exception
Message: The UiElement is no longer valid
Source. Click 'A '
Exception Type: InvalidUiElementException”
Could anyone give any tip of how to debug this problem?