Assignment 2, fails to select the next month

Working on Assignment 2 on advanced training, and I am having a hard time figuring out why the program is not selecting the next month. This is where your program needs to go through each month from January to December, downloading csv files if exists, and skip to the next month if not exists.

What is weird is, my current program works fine and it goes to the next month if the file of a month does not exist. But if it does exist and download the csv file and then delete it, it gets stuck and it won’t go to the next month.

I am using a click activity as instructed in the manual, for selecting the month from dropdown box.
Why does it work when there is no file, and not work if there is a file?

I don’t think it is a selector, because it works fine if there is no file. It keeps selecting the next month, until it actually finds a month with a file. After downloading the file, it stops selecting the next month.

I tried adding a delay before click activity used to select months, but it didn’t do anything.
Any idea?

For your information, this is Advanced Training - Assignment 2 (Performer) - System1_Create_Yearly_Report.xaml - inside for each loop where it iterates through each month.System1_CreateYearlyReport.xaml (24.4 KB)

Hi buddy @tomato25
This would surely help you sort this out

Shows error for select activity

Cheers @tomato25

Hmmm, this does not seem to work.

The problem is, selecting the next month works if there is no file. but it doesnt work if there is a file.
So I don’t think it is the selector.

1 Like

Aaaha did you use a attach browser activity to make the bot identify the month field element to click once after saving…i think save as will be of different window and as we were saving file out there that window would have got active and making this window with month field inactive…
So we need to make it active either by using a credit attach browser activity or a click on this screen to make it active…
Try this and let know buddy @tomato25
Cheers

I have actually thought about it, but that seems to not be it…

I tried clicking the random area of the browser using Click activity after the file is saved.
I also tried putting the entire activities (save file, delete it, etc) inside Attach Browser activity, and I put that attach browser activity inside for each loop, so it attaches the browser every iteration.
But both still don’t work.

It still works fine if there is no file to save.

Buddy i need this to be in a attach window as we need to make some progress here inside the current window after the file gets saved that usually takes place in a separate window and we have a attach window for that…its not the problem

We need a attach window separately to make q click on month field, next after the attach window where we save the file…
Cheers @tomato25

Okay, it seems to actually be the selector… After it got stuck, I always stopped execution, but this time I left it alone. And I got this error where the click activity for selecting a month is:

“Click ‘BUTTON’: Cannot find the UI element corresponding to this selector: < html title=‘ACME System 1 - Reports - Download Monthly Report’ />< webctrl aaname=’—’ parentid=‘searchForm’ tag=‘BUTTON’ />”,

I am very confused with this, because this click activity has a selector with a dynamic variable like the following:

“< html title=‘ACME System 1 - Reports - Download Monthly Report’ />< webctrl aaname=’” + month + “’ parentid=‘searchForm’ tag=‘A’ />”

where “month” is the variable, and it only receives “January” through “February”, but never “—”.
I don’t know why the error selector contains “—”. Why is it using a different selector after an iteration?

:frowning: I still can’t figure this out.

I am facing the same issue. Whats even more strange is that if I run the sequence createYearlyReport separately with hardcode values it runs perfectly.

I was finally able to resolve the issue. I changed the timeout duration for the click month activity to 1000. And it is now running fine.

Hi ,

If you are using attach window or attach browser then the selector will added to the all the activities in side the that activity… please cross check your dynamic selector in ui explorer and change the properties wait for ready and timeout

hello @tomato25

go through it

Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.