How can I get ID or attr from a SPAN? - imacros

I want to write a script with imacro to delete my phone number on my google email.
My problem is i cannot get the id of delete button, when i view source code I just see a span with attr but the text is encoded so I cannot get the text? So please help me to solved problem? To easy understand I upload the image in attach file, please help me to solved.
Thanks you

you can catch element also by class name
try this code
TAG POS=1 TYPE=span ATTR=CLASS:DPvwYc<SP>MRcnif

Related

Imacros add a part to the URL

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/*/....

Submit form with iMacros

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"

How to disable editor

I use django-tinymce to input formatted text. I need to disable whole field in form and all editor buttons but can't find how. If anyone has idea about how it can be done, please help.
You have to use HTML read only attribute. Here's a trick to do that via widget:
myform.fields['status'].widget.attrs['readonly'] = True

Using the TAG command to search for a img without clicing?

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

Description for inlined image field in django

After reading this post I'm wondering how to put a description text above the inline form to notice the user admin.
I also read this doc but I'm always stuck!
Thanks
You might be looking for help_text but I can't exactly tell from your question where you are expecting the text to show up
Edit: with regards to the comment below.
If you use StackedInline instead of TabularInline, your help text will show up.
If you really want your help text to show up on TabularInline, copy the template from
django/contrib/auth/templates/edit_inline/tabular.html
add field.help_text somewhere around the area to fit.