iMacro Date not being selected

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

iMacro Date not being selected

by jinhui on Wed Oct 04, 2017 3:17 am

I am new to iMacro and I am suppose to select date automatically, however after a few runs, some of the event selector codes don't select the date.

This is the code:
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/01/2000"
WAIT SECONDS=5
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_to_filter_input" BUTTON=0
WAIT SECONDS=5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" CHARS="31/12/2017"
WAIT SECONDS=5

Sometimes these works but there are other times when the automation don't select it. Is there any code to ensure that the code selects the dates?

I am running on Firefox 47.0 and iMacro for Firefox 8.9.7. I am also running on Windows 7.
jinhui
 
Posts: 9
Joined: Wed Oct 04, 2017 3:05 am

Re: iMacro Date not being selected

by chivracq on Wed Oct 04, 2017 5:34 am

jinhui wrote:
Code: Select all
Firefox 47.0 and iMacro for Firefox 8.9.7. I am also running on Windows 7.


I am new to iMacro and I am suppose to select date automatically, however after a few runs, some of the event selector codes don't select the date.

This is the code:
Code: Select all
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/01/2000"
WAIT SECONDS=5
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_to_filter_input" BUTTON=0
WAIT SECONDS=5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" CHARS="31/12/2017"
WAIT SECONDS=5


Sometimes these works but there are other times when the automation don't select it. Is there any code to ensure that the code selects the dates?

I am running on Firefox 47.0 and iMacro for Firefox 8.9.7. I am also running on Windows 7.

The Name is "iMacros" and not "iMacro" btw... :wink:

Hum, your Script looks fine, the 'WAIT' Statements (nearly too long actually) are correct to allow some extra Reliability if the Date Elements need to be dynamically populated/constructed which often happens with Ajaxy Elements, and your Script if obviously correct if it works "sometimes"...
Pb probably comes from the Site itself, Sites using Ajax Elements are usually very heavy on JavaScript and 3rd Party Libraries that may not always load correctly and a Refresh/Reload of the Page is often the only Solution...

But hum, the 2 'WAIT' Statements between the 'CLICK' to activate the Date Element and the "real" Input with their corresponding 'KEYPRESS' Statements is actually indeed too long..., try to shorten it to 1 sec or 0.5 sec. The Reason is that if your Script is waiting for 5 sec after that Date Element has been activated, it is possible that some Background JavaScript from the Page is checking for stg and disables it or takes the Focus somewhere else on the Page, or is already running some Validation on the Date Selection..., which has not occurred yet...!

And hum, you could try as well without those 2 'CLICK' Statements, they are probably not required...

Before the "real" 'KEYPRESS' Statement for the Input, you could try to add some "fake" 'KEYPRESS' Statement(s) with some Keyboard Action(s) with the Keyboard Arrows on the Date Element for the Page to "realize" "Oh...!, that 'Date' Element is alive, let's make sure to activate it, the User is making a Selection...!"... + Maybe combined with a Keyboard 'Enter' after the real Input... :idea:

But hum, if the Refresh or Reload is the only Solution because the Page is too "heavy" and didn't load correctly/completely, you could try re-extracting the Dates after you've entered them and upon Failure, fire the same Statements to fill them again (conditionally) or fire a complete Conditional Refresh/Reload of the Page... (Well, a "Conditional 'REFRESH'" is not possible in pure '.iim', but a Conditional 'URL GOTO' is..., or you would need to use a '.js' Script...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6966
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacro Date not being selected

by jinhui on Wed Oct 04, 2017 6:49 pm

Thank you for the help you have given.

I have tried using what you have suggested and it seems to work. But there is another problem while testing the "fake" KEYPRESS statement. After running it for 5 times, the problem occurred.

The problem:
- The arrow key move non stop and does not stop. It does not move on to the next line.
Just to check if i remove the "fake" KEYPRESS, there is no other method to test if the date section is actually working


EVENT TYPE=CLICK SELECTOR="#pr1002_input_vdate_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1002_input_vdate_input" KEYS="[39,37]"
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1002_input_vdate_input" CHARS="04/09/2016"
EVENT TYPE=KEYPRESS SELECTOR="#pr1002_input_vdate_input" KEY=13
-The date field was not selected.
The first code was supposed to show the calandar but it did not show and the subsequent part did not manage to change the date
Last edited by jinhui on Wed Oct 04, 2017 7:12 pm, edited 1 time in total.
jinhui
 
Posts: 9
Joined: Wed Oct 04, 2017 3:05 am

Re: iMacro Date not being selected

by chivracq on Wed Oct 04, 2017 7:06 pm

jinhui wrote:Thank you for the help you have given.

I have tried using what you have suggested and it seems to work. But there is another problem while testing the "fake" KEYPRESS statement. After running it for 5 times, the problem occurred.

The problem:
- The arrow key move non stop and does not stop. It does not move on to the next line.
Just to check if i remove the "fake" KEYPRESS, there is no other method to test if the date section is actually working?

Hum..., strange indeed...

But, hum-pfff-hum..., it's very difficult to try to help you "blind" without being able to "play" with the Site myself... Can't you post the URL...? (And the Steps to reach that Date Selection Screen if it's not "obvious"...?) :idea:

I usually select from a "Halloween Bag with 20-30 different Tricks" when I test on a Site, depending on how the Page reacts, I only mentioned about 3 or 4 of them, but that was already a lot of Typing...! It quickly becomes IF then try that or that or that, then IF+IF, then try that+that or that or that+that+that or that+that+(that_or_that), then IF+IF+IF try that+that+that+that, etc..., and it can easily go to up to 6 or 8 Levels of IF's, there are too many Combinations... :cry:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6966
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacro Date not being selected

by jinhui on Wed Oct 04, 2017 7:27 pm

chivracq wrote:
jinhui wrote:Thank you for the help you have given.

I have tried using what you have suggested and it seems to work. But there is another problem while testing the "fake" KEYPRESS statement. After running it for 5 times, the problem occurred.

The problem:
- The arrow key move non stop and does not stop. It does not move on to the next line.
Just to check if i remove the "fake" KEYPRESS, there is no other method to test if the date section is actually working?

Hum..., strange indeed...

But, hum-pfff-hum..., it's very difficult to try to help you "blind" without being able to "play" with the Site myself... Can't you post the URL...? (And the Steps to reach that Date Selection Screen if it's not "obvious"...?) :idea:

I usually select from a "Halloween Bag with 20-30 different Tricks" when I test on a Site, depending on how the Page reacts, I only mentioned about 3 or 4 of them, but that was already a lot of Typing...! It quickly becomes IF then try that or that or that, then IF+IF, then try that+that or that or that+that+that or that+that+(that_or_that), then IF+IF+IF try that+that+that+that, etc..., and it can easily go to up to 6 or 8 Levels of IF's, there are too many Combinations... :cry:


TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_populate_preference
WAIT SECONDS=3
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:pr1001_input_vdate_from_filter_input CONTENT=
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:pr1001_input_vdate_to_filter_input CONTENT=
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_1_Error<SP>Message<SP>-<SP>Refresh<SP>Without<SP>'From'<SP>Date.png
WAIT SECONDS=5
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:SGD
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEYS="[39,37]"
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/01/2000"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEY=13
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_to_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" KEYS="[39,37]"
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" CHARS="31/12/2017"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" KEY=13
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_2_Refresh<SP>With<SP>Ccy,<SP>'From'<SP>&<SP>'To'<SP>Date.png
WAIT SECONDS=3
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEYS="[39,37]"KEY=39
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/09/2016"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEY=13
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_3_Refresh<SP>With<SP>'From'<SP>&<SP>'To'<SP>Date<SP>Only.png
WAIT SECONDS=3

And I have also encountered the problem when the selector is not able to click on the field to show the calander and type in the dates.
Attachments
Capture.PNG
jinhui
 
Posts: 9
Joined: Wed Oct 04, 2017 3:05 am

Re: iMacro Date not being selected

by chivracq on Wed Oct 04, 2017 7:50 pm

jinhui wrote:
Code: Select all
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_populate_preference
WAIT SECONDS=3
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:pr1001_input_vdate_from_filter_input CONTENT=
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:pr1001_input_vdate_to_filter_input CONTENT=
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_1_Error<SP>Message<SP>-<SP>Refresh<SP>Without<SP>'From'<SP>Date.png
WAIT SECONDS=5
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:SGD
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEYS="[39,37]"
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/01/2000"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEY=13
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_to_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" KEYS="[39,37]"
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" CHARS="31/12/2017"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" KEY=13
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_2_Refresh<SP>With<SP>Ccy,<SP>'From'<SP>&<SP>'To'<SP>Date.png
WAIT SECONDS=3
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEYS="[39,37]"KEY=39
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/09/2016"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEY=13
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_3_Refresh<SP>With<SP>'From'<SP>&<SP>'To'<SP>Date<SP>Only.png
WAIT SECONDS=3


And I have also encountered the problem when the selector is not able to click on the field to show the calander and type in the dates.

Yeah, but I can't do much from a Printscreen, even if it gives me indeed a bit some "Feel" about it already, your 'CS Lucas' Site seems to have some Demo..., or if you can create some Guest/Test User on your own System... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6966
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacro Date not being selected

by jinhui on Wed Oct 04, 2017 8:01 pm

chivracq wrote:
jinhui wrote:
Code: Select all
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_populate_preference
WAIT SECONDS=3
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:pr1001_input_vdate_from_filter_input CONTENT=
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:pr1001_input_vdate_to_filter_input CONTENT=
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_1_Error<SP>Message<SP>-<SP>Refresh<SP>Without<SP>'From'<SP>Date.png
WAIT SECONDS=5
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:SGD
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEYS="[39,37]"
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/01/2000"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEY=13
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_to_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" KEYS="[39,37]"
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" CHARS="31/12/2017"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_to_filter_input" KEY=13
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_2_Refresh<SP>With<SP>Ccy,<SP>'From'<SP>&<SP>'To'<SP>Date.png
WAIT SECONDS=3
TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=ID:pr1001_combo_box_currency_filter_label
TAG POS=1 TYPE=LI ATTR=TXT:
WAIT SECONDS=1
EVENT TYPE=CLICK SELECTOR="#pr1001_input_vdate_from_filter_input" BUTTON=0
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEYS="[39,37]"KEY=39
WAIT SECONDS=0.5
EVENTS TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" CHARS="01/09/2016"
EVENT TYPE=KEYPRESS SELECTOR="#pr1001_input_vdate_from_filter_input" KEY=13
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON FORM=ID:form1 ATTR=ID:pr1001_command_refresh
WAIT SECONDS=7
SCREENSHOT TYPE=PAGE FOLDER={{!VAR0}} FILE=1017_3_Refresh<SP>With<SP>'From'<SP>&<SP>'To'<SP>Date<SP>Only.png
WAIT SECONDS=3


And I have also encountered the problem when the selector is not able to click on the field to show the calander and type in the dates.

Yeah, but I can't do much from a Printscreen, even if it gives me indeed a bit some "Feel" about it already, your 'CS Lucas' Site seems to have some Demo..., or if you can create some Guest/Test User on your own System... :idea:


I do not have access to the demo site as I am doing on a localhost. Would you mind using teamviewer to connect to my workstation?
Cause the problems usually start occurring after a 5-6 runs.
jinhui
 
Posts: 9
Joined: Wed Oct 04, 2017 3:05 am

Re: iMacro Date not being selected

by chivracq on Thu Oct 05, 2017 8:10 am

jinhui wrote:I do not have access to the demo site as I am doing on a localhost. Would you mind using teamviewer to connect to my workstation?
Cause the problems usually start occurring after a 5-6 runs.

(You don't need to quote yourself again when you quote me, that makes your Posts / the Thread unnecessary heavier and less easy to follow/read... Actually you don't really need to quote me unless you are replying to a specific part of my Post or if several other Users were participating in the Thread... I do quote systematically because some Users tend to delete their Posts once they got their Solution or keep editing them as they "progress", which then renders such Threads useless afterwards for other Users searching the Forum with a similar Case/Qt...)

Yep, I guess you don't have access to "the" Demo-Site, but you could inquire how to get access..., OK, just an Idea...

Hum, "Localhost", so that means that the Site/Software is running on a Local Server...? Then what I mentioned about the Page maybe not loading correctly shouldn't be the case then..., OK..., hum...

But..., TeamViewer, hum-pfff-hum..., is a lot of hassle and not very practical, I think..., I've already done it a few times in the past, and it doesn't really work, I only see what's happening on your Screen every 20 Lines from your Script, so that's not very helpful to try to follow your Script and follow what's happening on the Page... Hum, and it was "already" 05h in the morning "last night" when I was replying to your previous Posts, I'm located in NL in Europe, and I don't always stay up that late...!, and troubleshooting your Issue via TeamViewer will take hours..., hum and it's nearly WE, I'm usually a bit busy during the WE... (I'm a DJ in "real Life", ah-ah...!)

>>>

But OK, a few more "Ideas"...: :wink:
- You didn't post your '!TIMEOUT_xxx' Settings... Are you using the Default 60/6 sec or did you shorten them...? (And do you use '!ERRORIGNORE'...?)

- You mentioned you were looping your Script, but I don't see any use of a DataSource or anything based on '!LOOP' in your Script... On what part/Element/Functionality do you loop your Script...?
=> Hum..., on Currency then, I reckon, I see some "SGD" in your Script, the 'TAG' Statement on the 'LABEL' is probably not needed, and I guess the 'Date' Field then gets automatically filled/retrieved upon the Currency Selection.

But the 'Currency' Field is empty on your Printscreen...! :?
And I guess the 'Date' Field only gets activated once the 'Currency' Field has been filled in, so that means that the Pb actually comes from the 'Currency' Field and not from the 'Date' Field, and that's where your '!TIMEOUT_STEP' Setting can play a Role, first for the 'Currency' DDLB to get populated as I guess it probably gets dynamically populated, and then for the Page to "realize" that a Currency has been selected for the 'Date(s)' Field(s) to also dynamically get populated...

=> Selecting the Currency from the DDLB with the 'EVENT' Mode instead of the 'TAG' could be stg to try, the different 'WAIT' Statements you've put between all "real" 'TAG' and 'CLICK' and 'KEYPRESS' Statements look OK to me..., and also, directly after the 'TAG' (or 'CLICK') Statement for the Currency Selection in the 'Currency' DDLB, to add a "fake" 'CLICK' Statement (with the 'EVENT' Mode then) just outside the 'Currency' DDLB on some "Background" HTML Element where this Click won't do anything but the Page will "understand" that a Currency was selected and that it can start fetching the Data for the Dates...

And then, but it's getting a bit cumbersome, you could try re-extracting the (current) Currency in the DDLB to make sure it has been correctly selected, and if not, (Conditionally) redo that part or Conditionally PAUSE the Script for the User to do that Currency Selection manually before resuming the Macro Execution... That's the same Principle like I mentioned for a Conditional Refresh/Reload of the Page.
Or try to redo that part once and if it fails again then fire the Conditional 'PAUSE'... Hum, or a Conditional 'PROMPT' to alert the User more "ostensibly", but a Conditional 'PROMPT' is buggy on FF and a bit of a hassle, even if I've posted a Workaround... (which exploits some other Bug, ah-ah...!)
It's a bit cumbersome, but that's the "Price" to pay for "Reliability", I do it myself quite a lot as well, as I often have a slow/dropping Connection, so I had to be a bit "Creative" to palliate that and to make sure that my Scripts run/ran correctly and do/did their "Job"...!
OK, you still have a few "Things" to try, ah-ah...! :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6966
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacro Date not being selected

by jinhui on Wed Jan 24, 2018 1:59 am

chivracq wrote:
jinhui wrote:I do not have access to the demo site as I am doing on a localhost. Would you mind using teamviewer to connect to my workstation?
Cause the problems usually start occurring after a 5-6 runs.

(You don't need to quote yourself again when you quote me, that makes your Posts / the Thread unnecessary heavier and less easy to follow/read... Actually you don't really need to quote me unless you are replying to a specific part of my Post or if several other Users were participating in the Thread... I do quote systematically because some Users tend to delete their Posts once they got their Solution or keep editing them as they "progress", which then renders such Threads useless afterwards for other Users searching the Forum with a similar Case/Qt...)

Yep, I guess you don't have access to "the" Demo-Site, but you could inquire how to get access..., OK, just an Idea...

Hum, "Localhost", so that means that the Site/Software is running on a Local Server...? Then what I mentioned about the Page maybe not loading correctly shouldn't be the case then..., OK..., hum...

But..., TeamViewer, hum-pfff-hum..., is a lot of hassle and not very practical, I think..., I've already done it a few times in the past, and it doesn't really work, I only see what's happening on your Screen every 20 Lines from your Script, so that's not very helpful to try to follow your Script and follow what's happening on the Page... Hum, and it was "already" 05h in the morning "last night" when I was replying to your previous Posts, I'm located in NL in Europe, and I don't always stay up that late...!, and troubleshooting your Issue via TeamViewer will take hours..., hum and it's nearly WE, I'm usually a bit busy during the WE... (I'm a DJ in "real Life", ah-ah...!)

>>>

But OK, a few more "Ideas"...: :wink:
- You didn't post your '!TIMEOUT_xxx' Settings... Are you using the Default 60/6 sec or did you shorten them...? (And do you use '!ERRORIGNORE'...?)

- You mentioned you were looping your Script, but I don't see any use of a DataSource or anything based on '!LOOP' in your Script... On what part/Element/Functionality do you loop your Script...?
=> Hum..., on Currency then, I reckon, I see some "SGD" in your Script, the 'TAG' Statement on the 'LABEL' is probably not needed, and I guess the 'Date' Field then gets automatically filled/retrieved upon the Currency Selection.

But the 'Currency' Field is empty on your Printscreen...! :?
And I guess the 'Date' Field only gets activated once the 'Currency' Field has been filled in, so that means that the Pb actually comes from the 'Currency' Field and not from the 'Date' Field, and that's where your '!TIMEOUT_STEP' Setting can play a Role, first for the 'Currency' DDLB to get populated as I guess it probably gets dynamically populated, and then for the Page to "realize" that a Currency has been selected for the 'Date(s)' Field(s) to also dynamically get populated...

=> Selecting the Currency from the DDLB with the 'EVENT' Mode instead of the 'TAG' could be stg to try, the different 'WAIT' Statements you've put between all "real" 'TAG' and 'CLICK' and 'KEYPRESS' Statements look OK to me..., and also, directly after the 'TAG' (or 'CLICK') Statement for the Currency Selection in the 'Currency' DDLB, to add a "fake" 'CLICK' Statement (with the 'EVENT' Mode then) just outside the 'Currency' DDLB on some "Background" HTML Element where this Click won't do anything but the Page will "understand" that a Currency was selected and that it can start fetching the Data for the Dates...

And then, but it's getting a bit cumbersome, you could try re-extracting the (current) Currency in the DDLB to make sure it has been correctly selected, and if not, (Conditionally) redo that part or Conditionally PAUSE the Script for the User to do that Currency Selection manually before resuming the Macro Execution... That's the same Principle like I mentioned for a Conditional Refresh/Reload of the Page.
Or try to redo that part once and if it fails again then fire the Conditional 'PAUSE'... Hum, or a Conditional 'PROMPT' to alert the User more "ostensibly", but a Conditional 'PROMPT' is buggy on FF and a bit of a hassle, even if I've posted a Workaround... (which exploits some other Bug, ah-ah...!)
It's a bit cumbersome, but that's the "Price" to pay for "Reliability", I do it myself quite a lot as well, as I often have a slow/dropping Connection, so I had to be a bit "Creative" to palliate that and to make sure that my Scripts run/ran correctly and do/did their "Job"...!
OK, you still have a few "Things" to try, ah-ah...! :wink:


I have solved the problem using EVENT CLICK mode. Thanks for the help. :)
jinhui
 
Posts: 9
Joined: Wed Oct 04, 2017 3:05 am


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 6 guests

-->