Page 1 of 1

Find Text & Tag Pos using csv

Posted: Mon Oct 30, 2017 6:15 am
by Tamilselvan
Hi,

Firefox 53.0.3
Imacros 9.0.3
Windows 10 (32 bit)

I have Name list in name.csv file. Using this name i need to search name and find the Tag Position Number in web.

Tag Position Number should be extracted and stored in variable do some task.

Could you please help me.

in name.csv file contents
For example.
1. Sekar
2. Sumathi
3. Velan
4. Govinthammal
5. poinnusami
and so on.,
i don't know how to search name and find the Tag Position Number in web.
Demand-.jpg

then fill Date.

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_app CONTENT=12/10/2017
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_from CONTENT=12/10/2017
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_d3 CONTENT=6
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_to CONTENT=18/10/2017
ONDIALOG POS=1 BUTTON=OK CONTENT=
ONDIALOG POS=2 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_btnProceed

Demand-1.jpg

i have tried below manually. but its does not have any changes in TAG POS.
SEARCH SOURCE=TXT:Velan
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl02_job
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl03_job
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl04_job


Demand-2.jpg


The above images are shows that no.of rows depends on id from drop down list.
Note : ( i have already code to select id from drop-down automatically. Now i want to search name and find tag position)
Thanks in advance

Re: Find Text & Tag Pos using csv

Posted: Mon Oct 30, 2017 7:00 am
by chivracq
Tamilselvan wrote:Hi,

Code: Select all
Firefox 53.0.3
Imacros 9.0.3
Windows 10 (32 bit)


I have Name list in name.csv file. Using this name i need to search name and find the Tag Position Number in web.

Tag Position Number should be extracted and stored in variable do some task.

Could you please help me.

in name.csv file contents
For example.
Code: Select all
1. Sekar
2. Sumathi
3. Velan
4. Govinthammal
5. poinnusami
and so on.,

i don't know how to search name and find the Tag Position Number in web.
Demand-.jpg

then fill Date.

Code: Select all
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_app CONTENT=12/10/2017
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_from CONTENT=12/10/2017
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_d3 CONTENT=6
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_to CONTENT=18/10/2017
ONDIALOG POS=1 BUTTON=OK CONTENT=
ONDIALOG POS=2 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_btnProceed


Demand-1.jpg

i have tried below manually. but its does not have any changes in TAG POS.
Code: Select all
SEARCH SOURCE=TXT:Velan
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl02_job
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl03_job
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl04_job



Demand-2.jpg


The above images are shows that no.of rows depends on id from drop down list.
Note : ( i have already code to select id from drop-down automatically. Now i want to search name and find tag position)
Thanks in advance

Oh..., I see you are still editing your OP... But OK, if I understand correctly your "Need", you need the 'POS' Number for the Date Fields corresponding to a given Name. => Then simply use "Relative Positioning" for those Date Fields, with the Name as Anchor... :idea:

Re: Find Text & Tag Pos using csv

Posted: Mon Oct 30, 2017 7:15 am
by Tamilselvan
No 1st image shows that i filled date manually.



i used !VAR2 variable for tag pos

After finding out tag position its fill date automatically.

TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_app CONTENT=12/10/2017
TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_from CONTENT=12/10/2017
TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_d3 CONTENT=6
TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_to CONTENT=18/10/2017
ONDIALOG POS=1 BUTTON=OK CONTENT=
ONDIALOG POS=2 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_btnProceed

Re: Find Text & Tag Pos using csv

Posted: Mon Oct 30, 2017 7:43 am
by chivracq
Tamilselvan wrote:No 1st image shows that i filled date manually.

i used !VAR2 variable for tag pos

After finding out tag position its fill date automatically.

Code: Select all
TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_app CONTENT=12/10/2017
TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_from CONTENT=12/10/2017
TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_d3 CONTENT=6
TAG POS={{!VAR2}} TYPE=INPUT:TEXT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_to CONTENT=18/10/2017
ONDIALOG POS=1 BUTTON=OK CONTENT=
ONDIALOG POS=2 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_btnProceed

Yeah, but no..., your Approach is cumbersome, use Relative Positioning like I said... :idea:

If "ctl02" corresponds to "Velan" in your:
Code: Select all
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl02_job
... , then that would give stg like:
Code: Select all
SET App_Name "Velan"
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_job&&TXT:*{{App_Name}}*

TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_app CONTENT=12/10/2017
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_from CONTENT=12/10/2017
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_d3 CONTENT=6
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_to CONTENT=18/10/2017
ONDIALOG POS=1 BUTTON=OK CONTENT=
ONDIALOG POS=2 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:ctl00_ContentPlaceHolder1_btnProceed

Re: Find Text & Tag Pos using csv

Posted: Mon Oct 30, 2017 8:08 am
by Tamilselvan
I am just learning now.

i used .csv file instead of
SET App_Name "Velan"

Code is :

VERSION BUILD=11.5.498.2403
TAB T=1
SET !TIMEOUT_STEP 0
SET !DATASOURCE "C:\\Users\\OFFICE\\Documents\\iMacros\\Datasources\\Name.csv"
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}


SET App_Name {{!COL1}}
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_job&&TXT:*{{App_Name}}*

TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_app CONTENT=12/10/2017
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_from CONTENT=12/10/2017
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_d3 CONTENT=6
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_to CONTENT=18/10/2017
ONDIALOG POS=1 BUTTON=OK CONTENT=
ONDIALOG POS=2 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:ctl00_ContentPlaceHolder1_btnProceed

Finally its working.
Thank you !!! :D

Re: Find Text & Tag Pos using csv

Posted: Mon Oct 30, 2017 10:37 am
by chivracq
Tamilselvan wrote:I am just learning now.

i used .csv file instead of
Code: Select all
SET App_Name "Velan"


Code is :

Code: Select all
VERSION BUILD=11.5.498.2403
TAB T=1
SET !TIMEOUT_STEP 0
SET !DATASOURCE "C:\\Users\\OFFICE\\Documents\\iMacros\\Datasources\\Name.csv"
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}

SET App_Name {{!COL1}}
TAG POS=1 TYPE=SPAN ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_job&&TXT:*{{App_Name}}*

TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_app CONTENT=12/10/2017
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_from CONTENT=12/10/2017
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_d3 CONTENT=6
TAG POS=R1 TYPE=INPUT:TEXT ATTR=ID:ctl00_ContentPlaceHolder1_gvData_ctl*_dt_to CONTENT=18/10/2017
ONDIALOG POS=1 BUTTON=OK CONTENT=
ONDIALOG POS=2 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:ctl00_ContentPlaceHolder1_btnProceed


Finally its working.
Thank you !!! :D

Yep, very good...!, exactly what I meant... :D