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}}
Related
I am trying to fill up auto suggestion form on iMacros however despite all the efforts, it is still not working.
I tried
Method 1
The idea to work with Events
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=http://www.etihad.com/en-ae/
EVENT TYPE=CLICK XPATH="//input[#data-name='FlightBookingForm_Origin']"
BUTTON=0
EVENT TYPE=KEYPRESS XPATH="//input[#data-name='FlightBookingForm_Origin']"
CHAR="A"
EVENT TYPE=CLICK XPATH="//input[#data-name='FlightBookingForm_Origin']"
BUTTON=0
EVENT TYPE=KEYPRESS XPATH="//input[#data-name='FlightBookingForm_Origin']"
CHAR="U"
EVENT TYPE=CLICK XPATH="//input[#data-name='FlightBookingForm_Origin']"
BUTTON=0
EVENT TYPE=KEYPRESS XPATH="//input[#data-name='FlightBookingForm_Origin']"
CHAR="H"
EVENTS TYPE=KEYPRESS XPATH="//input[#data-name='FlightBookingForm_Origin']"
KEYS="[37,13]"
Method 2 Xpath Form Filling
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=http://www.etihad.com/en-ae/
EVENT TYPE=CLICK XPATH="//input[#data-name='FlightBookingForm_Origin']" BUTTON=0
WAIT SECONDS=5
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:wrapper ATTR=ID:frm_2012158061206151234
CONTENT=Abu<SP>Dhabi,<SP>Abu<SP>Dhabi<SP>Airport<SP>(AUH),
<SP>United<SP>Arab<SP>Emirates
TAG POS=1 TYPE=A ATTR=ID:ui-active-menuitem
WAIT SECONDS=5
EVENT TYPE=CLICK XPATH="//input[#data-name='FlightBookingForm_Destination']" BUTTON=0
WAIT SECONDS=5
TAG XPATH = "//input[#data-name='FlightBookingForm_Destination']"
CONTENT=London,<SP>Heathrow<SP>Airport<SP>(LHR),<SP>United<SP>Kingdom
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=ID:ui-active-menuitem
WAIT SECONDS=5
The following way seems to work:
SET !REPLAYSPEED MEDIUM
EVENT TYPE=CLICK XPATH="//input[#data-name='FlightBookingForm_Origin']" BUTTON=0
EVENTS TYPE=KEYPRESS XPATH="//input[#data-name='FlightBookingForm_Origin']" CHARS="Abu Dhabi"
TAG XPATH="id('frm_2012158061206151234ui_autocomplete')/descendant::a"
EVENT TYPE=CLICK XPATH="//input[#data-name='FlightBookingForm_Destination']" BUTTON=0
EVENTS TYPE=KEYPRESS XPATH="//input[#data-name='FlightBookingForm_Destination']" CHARS="Heathrow"
TAG XPATH="id('frm_20121580612061235ui_autocomplete')/descendant::a"
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}}
i have a piece of imacros code for sending out Yahoo eMails which works great. But except for pasting content in the body field. I have tried a few other methods using imacros, but i can't get this part to work.
Here is my code. Appreciate any help. :)
VERSION BUILD=844 RECORDER=CR
SET EMAIL "test#test.com"
SET PASS "password"
SET !ERRORIGNORE YES
URL GOTO=https://login.yahoo.com/?.src=ym&.intl=us&.lang=en-US&.done=https%3a//mail.yahoo.com
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:mbr-login-form ATTR=ID:login-username CONTENT={{EMAIL}}
TAG POS=1 TYPE=BUTTON FORM=ID:mbr-login-form ATTR=ID:login-signin
SET !ENCRYPTION NO
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:mbr-login-form ATTR=ID:login-passwd CONTENT={{PASS}}
TAG POS=1 TYPE=BUTTON FORM=ID:mbr-login-form ATTR=ID:login-signin
WAIT SECONDS=3
TAG POS=1 TYPE=SPAN ATTR=ID:yui_3_16_0_ym19_1_*
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:to-field CONTENT=test#gmail.com
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:subject-field CONTENT=test
TAG POS=1 TYPE=DIV ATTR=ID:rtetext
TAG POS=5 TYPE=SPAN ATTR=ID:yui_3_16_0_ym19_1_*
Have you tried using the Event recording mode (iMacros Sidebar - Manage Tab - Settings) for entering the message body? I tried a quick recording myself and found that the following two commands together were successful in filling the message body:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV:nth-of-type(9)>DIV:nth-of-type(3)>DIV:nth-of-type(4)>DIV:nth-of-type(2)>DIV:nth-of-type(7)>DIV>TABLE>TBODY>TR:nth-of-type(2)>TD>DIV>DIV>DIV:nth-of-type(2)" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV:nth-of-type(9)>DIV:nth-of-type(3)>DIV:nth-of-type(4)>DIV:nth-of-type(2)>DIV:nth-of-type(7)>DIV>TABLE>TBODY>TR:nth-of-type(2)>TD>DIV>DIV>DIV:nth-of-type(2)" CHARS="this is a test"
The new social media site minds.com does not seem to have an API for posting, so I have tried to create a macro to do so from a single line text file, thus (iMacros for Firefox [50.1]). I have tried the x-y method and the conventional methods as well as the "experimental" mode, shown following:
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
'SET !ERRORIGNORE YES
SET !DATASOURCE C:\[path-to-file]\[single line of text here].txt
SET !DATASOURCE_COLUMNS 1
SET !LOOP 1
'SET !DATASOURCE_LINE {{!LOOP}}
'SET !DATASOURCE_LINE {{1}}
URL GOTO=https://www.minds.com/newsfeed
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS- NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS- NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" CONTENT=Hi!
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS- NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>DIV>BUTTON" BUTTON=0
and I tried:
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=https://www.minds.com/newsfeed
SET !TIMEOUT_PAGE 30
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=ID:message CONTENT=Hello!
TAG POS=1 TYPE=BUTTON FORM=NAME:NoFormName ATTR=ID:Post<SP>send
Neither seems to work, nor does an x-y click (which just highlights the 'Post' button but does not "click" it).
The salient HTML for the button is:
<button class="mdl-button mdl-button--colored" type="submit">
Post <i class="material-icons">send</i>
</button>
I'm not sure what I'm missing. Any suggestions would be greatly appreciated.
Thanks!
-Brian Brown, Ph.D.
This part of your macro must work fine:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS-NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS-NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" CHARS="Hi !"
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS-NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>DIV>BUTTON" BUTTON=0
Doesn't it?
I cannot find a way to click on the button on Google Drive to click "File upload"
in Inspect element cannot find the exactly class which is changing every time,
trued to record with all kind of style but still not working.
Would be great if some one can check and figure out how it can be clicked.
Thank You in advance.
URL GOTO=https://drive.google.com/drive/my-drive
EVENT TYPE=MOUSEDOWN SELECTOR="#drive_main_page>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV>DIV" BUTTON=0
TAG POS=2 TYPE=DIV ATTR=CLASS:*-v&&ROLE:menuitem&&ID::4b
TAG POS=1 TYPE=INPUT:FILE ATTR=* CONTENT=C:\Users\Viktor\Documents\iMacros\Downloads\Folder\1.png
The following solution seems to work somehow:
' text for English as default language '
SET txtUpload "Upload files..."
URL GOTO=https://drive.google.com/drive/my-drive
EVENT TYPE=CLICK SELECTOR="#drive_main_page>DIV:nth-of-type(4)>DIV>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>svg>polygon" BUTTON=0
WAIT SECONDS=0.5
SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=DIV ATTR=TXT:{{txtUpload}} EXTRACT=HTM
SET id EVAL("'{{!EXTRACT}}'.match(/id=\"(.+?)\"/)[1];")
EVENT TYPE=CLICK SELECTOR="#\\{{id}}>DIV>SPAN:nth-of-type(2)>SPAN>DIV" BUTTON=0
TAG POS=1 TYPE=INPUT:FILE ATTR=* CONTENT=C:\Users\Viktor\Documents\iMacros\Downloads\Folder\1.png