iMacros not able to select a date in website Calendar

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
gorgesgg
Posts: 1
Joined: Wed Jul 19, 2017 2:24 pm

iMacros not able to select a date in website Calendar

Post by gorgesgg » Wed Jul 19, 2017 2:43 pm

Hi, I've been trying to manage this issue for a while but had no success.
I have a code that goes to a website and must select a date range, however, the dates are shown in a calendar as below:

Image

If you note the calendar shows the last 5 days of the previous month and because of that some days might appear twice in the calendar which causes iMacros to fail in selecting my date (28) correctly and just ignores my command. Other point is that i can't mannualy type the dates into the box i have to select it using this shitty calendar.

I use a CSV file to select my date ranges and input them and it works perfectly fine on the code, so i figured the problem is actully the display of the calendar in the website. Has anyone ever experienced such thing? Is there a way to dodge it? Thanks in advance.

Code: Select all

var macro;
macro =  "CODE:";
macro +=  "VERSION BUILD=9030808 RECORDER=FX" + "\n"; 
macro +=  "SET !ERRORIGNORE YES" + "\n";
macro +=  "SET !TIMEOUT_PAGE 300" + "\n"; 
macro +=  "SET !DATASOURCE IRCICLO.csv" + "\n"; 
macro +=  "SET !DATASOURCE_COLUMNS 1" + "\n";  
macro +=  "SET !DATASOURCE_COLUMNS 2" + "\n"; 
macro +=  "SET !DATASOURCE_COLUMNS 3" + "\n"; 
macro +=  "SET !DATASOURCE_COLUMNS 4" + "\n"; 
macro +=  "SET !DATASOURCE_COLUMNS 5" + "\n";
macro +=  "SET !LOOP 1" + "\n"; 
macro +=  "SET !DATASOURCE_LINE {{i}}" + "\n";
macro +=  "TAG POS=2 TYPE=A ATTR=HREF:javascript:acessarGera();" + "\n";
macro +=  "URL GOTO=http://sgi.e-boticario.com.br/Paginas/Acesso/Entrar.aspx?ReturnUrl=portal" + "\n";
macro +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:ctl00 ATTR=ID:txtUsuario_T2 CONTENT=jefersonm@grupoboticario.com.br" + "\n"; 
macro +=  "SET !ENCRYPTION NO " + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:ctl00 ATTR=ID:txtSenha_T2 CONTENT=bugalu12345!@#$" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=ID:btnLogin_btn" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=TXT:Adm.<SP>Vendas" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=TXT:Intenção<SP>Revenda" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=TXT:Consultar<SP>Intenções<SP>de<SP>Revenda" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=IMG ATTR=ID:ContentPlaceHolder1_txtDataInicio_I2" + "\n";  - Here's where the calendar pops up
macro +=  "WAIT SECONDS=3" + "\n"; 
macro +=  "TAG POS=1 TYPE=IMG ATTR=ID:ContentPlaceHolder1_txtDataInicio_I" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=2 TYPE=DIV ATTR=TXT:janeiro,<SP>2017" + "\n";  - Just setting the first month of the year
macro +=  "WAIT SECONDS=3" + "\n"; 
macro +=  "TAG POS=1 TYPE=DIV ATTR=TXT:{{!COL3}}" + "\n"; - Here's where I input my date rage (start) COL3 is my source from a CSV file
macro +=  "WAIT SECONDS=3" + "\n"; 
macro +=  "TAG POS=1 TYPE=DIV ATTR=TXT:{{!COL2}}" + "\n";  Here's where I input my date rage (finish) COLS2 is my source from a CSV file
macro +=  "WAIT SECONDS=3" + "\n"; 
macro +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:form1 ATTR=ID:ContentPlaceHolder1_txtCodigoEstruturaComercial_T2 CONTENT={{!COL1}}" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=SPAN ATTR=ID:ContentPlaceHolder1_ddlNivelEstruturaComercial_lblSelecionarDominio" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:form1 ATTR=ID:ContentPlaceHolder1_ddlNivelEstruturaComercial_rptListaDominio_chkUsarValorDominio_3 CONTENT=YES" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=SELECT FORM=ID:form1 ATTR=ID:ContentPlaceHolder1_ddlOrigem_d1 CONTENT=%7" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=ID:ContentPlaceHolder1_btnBuscar_btn" + "\n"; 
macro +=  "WAIT SECONDS=15" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=ID:ContentPlaceHolder1_btnExportar_btn" + "\n";
macro +=  "WAIT SECONDS=15" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=TXT:Colunas<SP>a<SP>serem<SP>exportadas" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=LABEL FORM=ID:form1 ATTR=TXT:Selecionar<SP>Todos" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:form1 ATTR=ID:ckbSelecionarTodos CONTENT=YES" + "\n"; 
macro +=  "WAIT SECONDS=2" + "\n";
macro +=  "ONDOWNLOAD FOLDER=* FILE=Intencao_RevendaCICLO_{{!NOW:ddmmyyyy}}_{{!COL1}}.xls WAIT=YES" + "\n";
macro +=  "TAG POS=1 TYPE=A ATTR=ID:agendamentoExportacao_okButton_B1" + "\n";  
macro +=  "TAG POS=1 TYPE=A ATTR=ID:popupOkButton" + "\n"; 
for (i=1;i<=10;i++){
iimSet("i",i)
iimPlay(macro);
}
Post Reply