Enter key not working in imacros - imacros

I want my form to submit when I hit the Enter key in the search input control, because the submit button is not available.
When I hit Enter manually it's working properly: the search keyword is submitted successfully. But when I record the successful keypress event using iMacros, it does not do anything during the replay. The event is recorded as KEY=13.
The iMacros code I'm using:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>UL>LI:nth-of-type(2)>BUTTON" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>FORM:nth-of-type(2)>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>FORM:nth-of-type(2)>TEXTAREA" CHARS="2nd search"
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)" KEY=13
Here is the test page of my case: http://zeccartourisme.com/test.html

Related

Can not press enter key with textarea in imacros

I just tried to hit the enter key with imacros in firefox but doesnt work.
The photo of my div is:
The image of my div
I tried using the following code:
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>#number>DIV:nth-of-type(5)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>textarea" KEY=13
But not work why is not working keypress with imacros.
my version is:
8.9.7
Sometimes other key event types might help:
EVENT TYPE=KEYDOWN SELECTOR="HTML>BODY>#number>DIV:nth-of-type(5)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>textarea" KEY=13
or
EVENT TYPE=KEYUP SELECTOR="HTML>BODY>#number>DIV:nth-of-type(5)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>textarea" KEY=13

imacros select from popup dropdown

Could you please help me :)
I have a TEXTBOX field which filling from a dropdown popup list.
enter image description here
It's not a drop-down list where I could use TYPE=SELECT
It doesn't take it as just a text, it needs to be picking from the list.
If I record a macro, it gives me:
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:management_main ATTR=ID:order_release/attribute1 CONTENT=201500
TAG POS=2 TYPE=TR ATTR=TXT:201500
If I record a macro in Experimental event recording mode:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" CHARS="201500"
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" KEY=13
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV>TABLE>TBODY>TR>TD>DIV>DIV>TABLE>TBODY>TR>TD" BUTTON=0
I've tried:
EVENT TYPE=CLICK SELECTOR="#order_release/attribute1" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#order_release/attribute1" CHARS="201500"
it doesn't work also...
Inspection of elements:
enter image description here
So still can't catch this event to fill that field...
Have you any idea for me?
I would be veeeeeery thankful)
Thank you in advance!
I have found a solution and it works:
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:management_main ATTR=NAME:order_release/attribute1 CONTENT={{!COL7}}
TAG POS=1 TYPE=INPUT:HIDDEN FORM=NAME:management_main ATTR=ID:order_release/attribute1#ID CONTENT={{!COL7}}

unable to make a facebook post using iMacros

I made a script on iMacros using normal recording mode to make a wall post, but it doesn't seem to be recording the content to pasted on my wall though..
This is the code I wrote using the normal mode
TAG POS=1 TYPE=DIV ATTR=CLASS:_1mf<SP>_1mj EXTRACT=TXT
The above is able to extract contents from the post message field, however I'm unable to make it type contents into the same field... :(
Now, I have tried using EVENT recording mode and I am still facing issues.. Here is my code:
EVENT TYPE=MOUSEDOWN SELECTOR="#u_0_16" BUTTON=0
EVENT TYPE=MOUSEUP POINT="(386,118)"
EVENT TYPE=KEYPRESS SELECTOR="#js_gy>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV" CHAR="d"
EVENTS TYPE=KEYPRESS SELECTOR="#js_gy>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV" CHARS="Pasting Sample Content"
What am i doing wrong? :O :O
I don't know why you're still facing issues. So for example, try to play these lines:
TAG POS=1 TYPE=DIV ATTR=CLASS:_1mf<SP>_1mj EXTRACT=TXT
EVENT TYPE=CLICK SELECTOR="DIV[CLASS='_1mf _1mj']" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="DIV[CLASS='_1mf _1mj']" CHARS={{!EXTRACT}}

imacros: submitting textarea form (enter key maybe?)

Question: How to simulate an ENTER (to submit a text in a live chat)?
(if there is an alternative to using the ENTER key, like using javascript in imacros to trigger an event, that would be great too)
Explanation:
I am trying to submit a comment in a live chat that uses a <textarea> element for input. Here is the source code:
<form class="chatbox nolabel">
<textarea class="textbox" type="text" size="70" autocomplete="off" name="message" style="resize: none; overflow-y: hidden;"></textarea>
</form>
I have attempted various different approaches of inputting the word "hello" and pressing the ENTER key (so that hello is sent to the users reading), however the only thing I am capable of doing is inputting the word "hello".
Attempt 1:
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=NAME:message CONTENT=hi
Results from Attempt 1:
When recording, this is the code that appeared when I started typing in the text area, and it successfully places the content into the textarea, however I didn't see any code being recorded when I press the ENTER key, so I assume that is the issue in this case.
Attempt 2: (event recording mode)
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>FORM>TEXTAREA:nth-of-type(2)" CHARS="hi"
WAIT SECONDS=1
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>FORM>TEXTAREA:nth-of-type(2)" KEY=13
Results from Attempt 1:
In this case, I tried using the Keypress type with events to simulate hitting the ENTER key, however what resulted was getting a "hi(newline)".
Any ideas?
Sometimes other key event types may help:
EVENT TYPE=KEYDOWN SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>FORM>TEXTAREA:nth-of-type(2)" KEY=13
or
EVENT TYPE=KEYUP SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>FORM>TEXTAREA:nth-of-type(2)" KEY=13

How to select everything that goes after #imageContent

I have this line of code
EVENT TYPE=CLICK SELECTOR="#imageContent18>IMG" BUTTON=0
Number 18 always changes so i want to select everything that goes after #Content
i trued to do it likes this #imageContent*, but it's seems something incorrect in my syntactic
You may try something like this:
EVENT TYPE=CLICK SELECTOR="[id^=imageContent]>IMG" BUTTON=0