IMacros: Extract ID Attribute From A Ul Li List
I have this current situation: a webpage with a ul / li list . I want to extract all the li elements . html content :
Solution 1:
VERSION BUILD=7401598
TAB T=1
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
URL GOTO=http://xxxxxxxxxxx
TAG POS=1 TYPE=A ATTR=ID:selectedPerfDiv
TAG POS=R{{!LOOP}} TYPE=LI ATTR=ID:* EXTRACT=TXTALL
SAVEAS TYPE=EXTRACT FOLDER=* FILE=list.csv
How about you try this ? I can't tell if it will work but when you have to access element withing another HTML tag element then you use R1 R2 etc . Example:
TAG POS=1 TYPE=DIV ATTR=CLASS:some_div
TAG POS=R1 TYPE=A ATTR=TXT:www.example.com EXTRACT=HREF
Solution 2:
To extract all LI elements, use this command:
TAG POS=1 TYPE=UL ATTR=ID:selectPerfList EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=list.csv
You should read more about data extraction here.
Post a Comment for "IMacros: Extract ID Attribute From A Ul Li List"