Find Text & Tag Pos using csv

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

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.

Find Text & Tag Pos using csv

by Tamilselvan on Mon Oct 30, 2017 6:15 am

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
Tamilselvan
 
Posts: 52
Joined: Mon Mar 07, 2016 3:49 am

Re: Find Text & Tag Pos using csv

by chivracq on Mon Oct 30, 2017 7:00 am

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:
- (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: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Find Text & Tag Pos using csv

by Tamilselvan on Mon Oct 30, 2017 7:15 am

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
Tamilselvan
 
Posts: 52
Joined: Mon Mar 07, 2016 3:49 am

Re: Find Text & Tag Pos using csv

by chivracq on Mon Oct 30, 2017 7:43 am

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
- (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: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Find Text & Tag Pos using csv

by Tamilselvan on Mon Oct 30, 2017 8:08 am

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
Tamilselvan
 
Posts: 52
Joined: Mon Mar 07, 2016 3:49 am

Re: Find Text & Tag Pos using csv

by chivracq on Mon Oct 30, 2017 10:37 am

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
- (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: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 13 guests

-->