I am creating a macro in which I want to click the anchor element.
The problem with this anchor element is that all the attributes changes randomly after every click.
Below is the anchor link
<a id="bLMa" class="**btn valign-wrapper** pulse **animated** lime accent-2 black-text">**StŠ°rt**</a>
Items marked between star always remain same. All other items changes continuously.
The location of the anchor changes randomly after every click.
I tried below steps
TAG XPATH="//*[#class="animated"]"
TAG POS=1 TYPE=A ATTR=Class:animated
TAG POS=1 TYPE=A ATTR=TXT:Start
TAG POS=1 TYPE=A ATTR=TXT:*Start*
I always get the same error as Element Not Found.
Please suggest.
You can try combining Attributes to identify the anchor you want to find as per http://wiki.imacros.net/TAG_parameters_explained#Multiple_ATTR_parameters
For your specific example something like
TAG POS=1 TYPE=A ATTR=class:*animated*&&TXT:*Start*
could work, looking for the class animated AND the text Start together in an anchor.
Related
How to turn below into a complete link ?
below are from imacro
TAG POS=1 TYPE=SELECT FORM=ACTION:index.php ATTR=NAME:combatSetId CONTENT=%355181
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:index.php ATTR=NAME:submit
I'm not sure of the syntax within iMacros (10.0.2.1450, which has been paid for, and is being run on Firefox Quantum 66.0.3) to extract an image from within a DIV with a particular class
I have tried to look up info on the iMacros wiki and have Googled extensively, but am not sure how to extract the image, when I think the type needs to be DIV with a particular class as the Attribute.
TAG POS=1 TYPE=IMG ATTR=ALT:*&&SRC:*&&CLASS:particularclass EXTRACT=HREF
This is the code on the site I'm trying to extract the image from
<div class="particularclass">
<img alt="sample" src="https://sample.com/sample.jpg">
</div>
I'm trying to save this image. I don't want to find it on the page based on any details of the image, I want to find it on the page by finding the div with a particular class, and saving the image within that div
When I tried the following, it's not finding an image with this class:
TAG POS=1 TYPE=IMG ATTR=ALT:*&&SRC:*&&CLASS:particularclass EXTRACT=HREF
If anyone can help with the syntax, I'll be eternally grateful!
Thanks,
Paul
TAG POS=1 TYPE=DIV ATTR=CLASS:*replaceWithATTRclass*EXTRACT=*replaceWithATTRname*
Try this code, replace replaceWithATTRname with the name of the ATTR you want to extract, and replace replaceWithATTRclass with your class. You can also change the Type accordingly along with the position.
I want to link one HTML page to another one. So, I use anchor tag
<a href="xyz.html>sign</a>.
As my "xyz.html" is in the current folder and on click on "sign", it does not work.
Even I also applied jQuery on click method.
Assuming "sign" is in your anchor tag, try this :
Sign
You not Close the double quote
sign
The<a> tag defines a hyperlink, which is used to link from one page to another
As title, I am trying to click the clickbox automatically using Chrome iMacros. However the ATTR id for the checkbox keep changing. I found that replace the id with asterisk * should work, however, I got no luck using the asterisk, so anyone know if there are any other solution? Here is the sample iMacros:
Direct capture using iMacros record:
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID:gwt-uid-7116 CONTENT=YES
Replace asterisks(*):
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=ID:gwt-uid-* CONTENT=YES
I'm extracting text from a website:
TAG POS=1 TYPE=TD ATTR=TXT:*<SP>(View<SP>Listing) EXTRACT=TXT
but later i want to use only what is before the VIEW LISTING text so i want to subtract this from the EXTRACT, how to do it?
I tried this:
SET !CLIPBOARD {{!EXTRACT}}
ADD !CLIPBOARD -<SP>(View<SP>Public<SP>Listing)
and this:
SET !EXTRACT EVAL("var s=\"{{!EXTRACT}}\"; s.slice(\"'\", -22);")
(found both on stack) but none of these work. also i can't extract without this text in the first place (the site is built this way)
Okay stupid mistake in syntax, found the solution:
SET !EXTRACT EVAL("var s=\"{{!EXTRACT}}\"; s.slice(\"\", -22);")