caduque
(Cedric)
July 29, 2019, 7:07am
1
Hi! I have to select the previous month from a drop down. But my code seems incorrect.
And I’m using this code to get the previous month.
But I’m getting this error.
I’m getting the correct value which is June but I think it should be in upper to be selected. Can someone help me with this?
Thanks!
Ryt, Try by using upper
Date.now.Addmonths(-1).tostring(“MMMM”).ToUpper
1 Like
Sure, so your format MMMM is getting you June and July correctly because it is only getting 4 letters from the months. So you would not get September, but you would get Sept and so on. But Sept does not exist in your drop down so because of that you are getting an exception
caduque
(Cedric)
July 29, 2019, 7:17am
4
Tried Date.now.Addmonths(-1).tostring(“MMMM”).ToUpper but I’m getting this error.
For testing just try to select itme by using Hardcoded “JUNE”
Then check is it working or not.
caduque
(Cedric)
July 29, 2019, 7:20am
6
Tried hardcoding but still getting the error.
I think the select item is not working over there ,
Try to use click activity by clicking on one of the Month and then use variable in selectors
By review ur screen shot is there any option for type the month
caduque
(Cedric)
July 29, 2019, 7:35am
8
Sir, tried using click. It would click JANUARY using this selector
But the same error message will pop up after
Open UiExplorer tree in that use aaname property where u will find the month name so u can use it in ur workflow
if still prob then
can u share ur workflow file??
What is the website? Since you send us only with Attach Browser activity
caduque
(Cedric)
July 29, 2019, 8:35am
12
The website is an internal system in our company
Okay, so you need to send us the screenshot of your selector when you are using Select Item Activity
caduque
(Cedric)
July 29, 2019, 9:09am
14
Here’s my selector for that SELECT ITEM Activity
And here’s the error message I’m getting.
Based from the error message, it can get the value ‘June’ which is correct. I just have to make it uppercase so it matches the selection in the drop down. But when I do the Date.now.Addmonths(-1).tostring(“MMMM”).ToUpper, error message like this will pop
caduque
(Cedric)
July 29, 2019, 9:31am
16
Dude it worked! Thank you so much!
system
(system)
Closed
August 1, 2019, 9:47am
18
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.