select href tag in a div with imacros?

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.

select href tag in a div with imacros?

by bilgamyompi on Mon Feb 12, 2018 12:10 pm

hello i want to get the value of a list but first i must to enter the div and the class. so first i do:
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=DIV ATTR=CLASS:"list" EXTRACT=TXT

but i want to get the correct values so i do something like this:
'TAG POS=1 TYPE=A ATTR=CLASS:"nick" EXTRACT=TXT

It's possible to get all elements of this div list and then the correct value?
Normally when i extract using the first the info is not correct so it's something else to get the correct tag from a div list?
bilgamyompi
 
Posts: 14
Joined: Mon Feb 12, 2018 12:03 pm

Re: select href tag in a div with imacros?

by chivracq on Mon Feb 12, 2018 12:59 pm

bilgamyompi wrote:hello i want to get the value of a list but first i must to enter the div and the class. so first i do:
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=DIV ATTR=CLASS:"list" EXTRACT=TXT


but i want to get the correct values so i do something like this:
Code: Select all
'TAG POS=1 TYPE=A ATTR=CLASS:"nick" EXTRACT=TXT


It's possible to get all elements of this div list and then the correct value?
Normally when i extract using the first the info is not correct so it's a way to get the correct tag from a div list?

FCIM...! :mrgreen: (Read my Sig...)
=> iMacros for FF v8.9.7...?, FF55...?, OS...?

Hum, can't you post the URL to this Page...?, it's difficult to understand what you want exactly without seeing how the Page and its HTML Structure look like...

But yep it's possible, if your 'Class=list' 'DIV' is the Containing 'DIV' for the whole List, then sure, all Info you want should be present and extractable, maybe with some 'EXTRACT=HTM' rather than your 'EXTRACT=TXT'.

For the 2nd 'EXTRACT' on your 'Class=nick' Element/Link, it's not clear how you "decide" about "the correct value"...
If the 'Class=nick' Element is the only Element with that Class, then yep, your Extract looks correct (or maybe rather with 'EXTRACT=HREF' if you are looking for the URL), but if you need the first 'TAG' Statement to "locate" your 'nick' Link, then you can use "Relative Positioning", but if the Link is inside the 'DIV', then you will need "Double Relative Positioning" to first get out of the 'DIV' for the 2nd R-Pos to be able to see inside it again...
Last edited by chivracq on Mon Feb 12, 2018 2:31 pm, edited 1 time in total.
- (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: 6960
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: select href tag in a div with imacros?

by bilgamyompi on Mon Feb 12, 2018 1:23 pm

it's solved thx
bilgamyompi
 
Posts: 14
Joined: Mon Feb 12, 2018 12:03 pm


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 7 guests

-->