First of all I am new to imacro .I am trying to get a list of urls analyzed by Mobile-friendly Test Tool ,but I am not able to get a click on Analyze button using imacros.
I have tried to make it working using class,text as well as with Role, but could not get it working,
Method 1.TAG POS=1 TYPE=DIV ATTR=CLASS:goog-inline-block<SP>jfk-button<SP>jfk-button-action<SP>analyze<SP>main-submit<SP>jfk-button-hover<SP>jfk-button-active<SP>jfk-button-focused<SP>jfk-button-clear-outline&&TXT:*
Method 2.TAG POS=3 TYPE=DIV ATTR=ROLE:button&&TXT:ANALYZE
so is there any other way I could make it working.Thanking you in advance.
This must work:
EVENT TYPE=CLICK SELECTOR="#page-speed-insights>DIV>FORM>DIV>DIV>DIV" BUTTON=0
Related
I'm trying to make a Imacro script to download multiple photos from Unsplash because I have a project and it's time consuming to download one by one.
So far, I've managed to make the following code. But it skips many images.
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:https://unsplash.com/photos/*/download?force=true
Then I found out that the problem is Unsplash doesn't have download?force=true for all images.
Now, what I want is, let it add + download?force=true part after the URL automatically.
To clarify more, this is what I want.
https://unsplash.com/photos/*/ + download?force=true
Thanks in advance.
This should be good enough, I would think:
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:https://unsplash.com/photos/*/*
Only keep the parts that are always there and replace the parts that might be changing or might not be there with *, like you were already doing in /photos/*/....
I know this might seem a lazy question, but I did not find a straight to the point answer yet.
When I type "submit form with imacros" on Google, nothing is clear to me.
And the official iMacros documentation talks about filling forms, but not about submitting them.
I saw that some examples use javascript:
URL GOTO=javascript:window.document.form.submit();
Other examples use CLICK with coordinates.
So, how do you submit forms with iMacros?
The most basic way to submit a form is via the submit button supplied at the page.
The easiest way to do so is to record clicking on it (FireFox iMacro addon -> Record tab -> Record , play with record options only if needed). The output will be saved under #Current.iim and will look like this:
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=http://demo.imacros.net/Automate/TestForm1
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Automate/FormSubmitConfirm ATTR=TXT:Click<SP>to<SP>order<SP>now
iMacro will use attributes like html type, form action and the text on the button to identify it against others. Once recorded you can start messing around with attributes if you have additional needs.
Solutions like CLICK or javascript have a tendency to almost never work (for me personally) and are used in more extreme cases where the buttons change names/ids/locations in an unpredictable way.
If you want to press enter to submit then you can do this this works in CHROME imacros for me ..
EVENT TYPE=KEYPRESS SELECTOR="#react-root>SECTION>MAIN>DIV>DIV>ARTICLE>DIV:nth-of-type(2)>SECTION:nth-of-type(3)>FORM>TEXTAREA" CHAR="\r"
I'm having some trouble with DS CMD=CLICK. It's only working part of the time.
Here is the series of tasks I'm trying to accomplish. There is a list of addresses on the bottom third of a webpage and a map on the top two-thirds . Each address is numbered. When the address is clicked, the map centers in on the address. The bottom third with the list of addresses remains unchanged.
When the map centers in on the address, I need the DS CMD=CLICK to click on the center of the screen. Once it's clicked, a popup comes up and that's where lines 11 on come into play.
For some reason, DS CMD=CLICK only seems to work occasionally.
I know for a fact that all of the addresses I'm trying are valid and have a pop up when clicked because I did it manually to make sure everything would work correctly.
Here is my code:
VERSION BUILD=10.4.28.1074
TAB T=1
SET !ERRORIGNORE YES
TAB CLOSEALLOTHERS
URL GOTO=http://URL
TAG POS=1 TYPE=TD ATTR=TXT:{{!LOOP}}
SIZE X=1231 Y=835
WAIT SECONDS=5.171
DS CMD=CLICK X=613 Y=335 CONTENT=
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:mapBalloonCommands
WAIT SECONDS=3
TAG POS=2 TYPE=SPAN ATTR=TXT:Add<SP>To<SP>List
WAIT SECONDS=3
TAG POS=1 TYPE=SPAN ATTR=ID:balloonCloseBtn
WAIT SECONDS=3
Any idea what's going wrong? Also, I'm using the imacros browser if that matters.
Thanks!
I'm having a hard time programming iMacros to click on one single button..
Please see the following page: http://iconosquare.com/viewer.php#/user/25025320/
I want iMacro to click the bottom button that says "MORE"
What "code" can I use to do that?
Thanks in advance!
Best regards.
How about this code?
TAG POS=1 TYPE=A ATTR=CLASS:more
I have a web where an image is shown and when clicked it starts the uploading process to upload picture. I would like to be able to check if this image exist but without clicking it. The TAG command seems to always click the element it selects. Is there any possibility to avoid this?
Thanks in advance.
use extract in tag command to prevent it from clicking, something like this:
tag pos=1 type=img attr=txt:* extract=txt