unable to paste content on yahoo body using iMacros - imacros
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"
Related
iMacros EVENT mode is malfunctioning during KEYPRESS
I have an iMacros code that copies content from one blog and posts the article image and article body content to my Facebook Wall post. Here is the working code: VERSION BUILD=844 RECORDER=CR SET !EXTRACT_TEST_POPUP NO SET URL http://www.marketwatch.com/story/too-early-to-tell-if-trump-bump-seen-in-jobs-numbers-economists-say-2017-03-10 URL GOTO={{URL}} WAIT SECONDS=2 TAG POS=1 TYPE=IMG ATTR=CLASS:article-image<SP>MG EXTRACT=HREF SET IMG {{!EXTRACT}} SET !EXTRACT NULL TAG POS=1 TYPE=DIV ATTR=ID:article-body EXTRACT=TXT SET BODY EVAL("var s=\"{{!EXTRACT}}\"; s=s.split('More from this Website')[0]; s;") SET !EXTRACT NULL URL GOTO=www.facebook.com WAIT SECONDS=2 TAG POS=1 TYPE=DIV ATTR=CLASS:composerAudienceWrapper<SP>stat_elem<SP>_ej0 WAIT SECONDS=2 EVENTS TYPE=KEYPRESS SELECTOR="DIV[CLASS='_1mf _1mj']" CHARS="{{IMG}}" WAIT SECONDS=5 EVENTS TYPE=KEYPRESS SELECTOR="DIV[CLASS='_1mf _1mj']" KEYS="[8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]" WAIT SECONDS=2 EVENTS TYPE=KEYPRESS SELECTOR="DIV[CLASS='_1mf _1mj']" CHARS="{{BODY}}" TAG POS=1 TYPE=BUTTON FORM=ID:u_0_15 ATTR=TXT:Post WAIT SECONDS=2 At this line: EVENTS TYPE=KEYPRESS SELECTOR="DIV[CLASS='_1mf _1mj']" CHARS="{{IMG}}" , when the code pastes the image URL into Facebook, it does the work halfway and it starts to mis-function - meaning it starts clicking some randone buttons on my facebook wall (while this line of code is still executing)... Is there a solution to this issue?
If you want to paste a large piece of text, try to do this via clipboard, for example: SET !EXTRACT_TEST_POPUP NO SET URL http://www.marketwatch.com/story/too-early-to-tell-if-trump-bump-seen-in-jobs-numbers-economists-say-2017-03-10 URL GOTO={{URL}} WAIT SECONDS=2 TAG POS=1 TYPE=IMG ATTR=CLASS:article-image<SP>MG EXTRACT=HREF SET IMG {{!EXTRACT}} SET !EXTRACT NULL TAG POS=1 TYPE=DIV ATTR=ID:article-body EXTRACT=TXT SET BODY EVAL("var s=\"{{!EXTRACT}}\"; s=s.split('More from this Website')[0]; s;") SET !EXTRACT NULL URL GOTO=www.facebook.com WAIT SECONDS=2 SET !CLIPBOARD {{IMG}} TAG POS=1 TYPE=LABEL ATTR=TXT:"Choose a file to upload" TAG POS=R1 TYPE=DIV ATTR=ID:* EXTRACT=HTM SET id EVAL("'{{!EXTRACT}}'.match(/id="(.*?)"/)[1];") EVENT TYPE=CLICK SELECTOR="#{{id}}>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV" BUTTON=0 EVENT TYPE=KEYPRESS SELECTOR="#{{id}}>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV" CHAR="v" MODIFIERS="ctrl" ' ...
iMacro - Firefox - OnDownload not working?
I'm using the last version of iMacro and of Firefox. I'm trying to run it so it downloads a .csv into a specific folder on a different drive that's on the network which it does have access to, the machine that is. However, every time I see to download it, it does it in the default folder. Now I did change the download folder but, since I need iMacro to also rename it it just won't cut it exactly. Here's the code. Now I know I inserted a comment in there, I was playing around to make it work. Thank you. VERSION BUILD=8890130 RECORDER=FX TAB T=1 URL GOTO=WEBSITE FRAME F=1 TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:username CONTENT=USERNAME SET !ENCRYPTION NO TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:password CONTENT=PASSWORD TAG POS=1 TYPE=BUTTON ATTR=TXT:LOG<SP>IN URL GOTO=WEBSITE WAIT SECONDS=15 TAG POS=1 TYPE=DIV ATTR=ID:ext-gen1194 TAG POS=1 TYPE=A ATTR=TXT:Today TAG POS=1 TYPE=SPAN ATTR=ID:button-1030-btnInnerEl WAIT SECONDS=10 ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd}}.csv WAIT=YES 'ONDOWNLOAD FOLDER="\\\\DifferentServer\\path\\path\\path\\path\\path\\" FILE=+{{!NOW:yyyymmdd}}.csv WAIT=YES WAIT SECONDS=10 TAG POS=1 TYPE=SPAN ATTR=ID:button-1055-btnIconEl WAIT SECONDS=10 TAB CLOSEALLOTHERS TAB T=1 TAB CLOSE
How to Capture div/table where Webpage gets refreshed continuously(to get live data) Imacro code(933)
I am tring to capture a table using CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT. My webpage is continuously getting refreshed as it gives live records due to which m facing problem, as Imacro waits for webpage to get loaded. Can anyone please help me I am very new to Imacro and coding. My code looks like this: VERSION BUILD=8850919 RECORDER=FX TAB T=1 URL GOTO=about:home URL GOTO=http://10.1.0.100/ TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:txt_usr_name CONTENT=***** SET !ENCRYPTION NO TAG POS=1 TYPE=INPUT:PASSWORD ATTR=ID:txt_password CONTENT=******* TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:form0 ATTR=ID:btn_logon FRAME NAME="bottomLeftFrame" TAG POS=1 TYPE=SPAN ATTR=TXT:Maintenance TAG POS=1 TYPE=SPAN ATTR=TXT:Statistics TAG POS=1 TYPE=TABLE ATTR=ID:list_table&TXT: CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT FRAME NAME="bottomLeftFrame" ONDIALOG POS=1 BUTTON=OK CONTENT= TAG POS=1 TYPE=SPAN ATTR=ID:t_menu_logout I have tried this method in my other webpages it worked perfectly as expected. Thanks in advance
Try to see if this works. You have to put the download folder location in order for it to work. VERSION BUILD=8850919 RECORDER=FX TAB T=1 URL GOTO=about:home URL GOTO=http://10.1.0.100/ TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:txt_usr_name CONTENT=***** SET !ENCRYPTION NO TAG POS=1 TYPE=INPUT:PASSWORD ATTR=ID:txt_password CONTENT=******* TAG POS=1 TYPE=INPUT:BUTTON FORM=ID:form0 ATTR=ID:btn_logon FRAME NAME="bottomLeftFrame" TAG POS=1 TYPE=SPAN ATTR=TXT:Maintenance TAG POS=1 TYPE=SPAN ATTR=TXT:Statistics ONDOWNLOAD FOLDER=C:\ FILE=screenshot.png TAG POS=1 TYPE=TABLE ATTR=ID:list_table&TXT: CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT FRAME NAME="bottomLeftFrame" ONDIALOG POS=1 BUTTON=OK CONTENT= TAG POS=1 TYPE=SPAN ATTR=ID:t_menu_logout
iMacros .if .else captcha
Good afternoon! I've a code with bypass captcha service written in iMacros.My problem is.. I need to do that if my captcha is incorrect then to do it again like a loop or if captcha is good then go next part of code. How can i do that in iMacros.I heard about javascript there but can't make up code. Please, look at my code. URL GOTO="my site" TAG POS=1 TYPE=DIV ATTR=TXT:"my options" TAG POS=1 TYPE=INPUT:RADIO ATTR=ID:"my options" wait seconds=2 SET !EXTRACT_TEST_POPUP NO ONDOWNLOAD FOLDER=C:\Captcha\ FILE=image.jpg WAIT=YES TAG POS=1 TYPE=IMG ATTR=SRC:"image captcha" CONTENT=EVENT:SAVEPICTUREAS tab open tab t=2 URL GOTO="service captcha" TAG POS=1 TYPE=INPUT ATTR=NAME:pict CONTENT=C:\Captcha\image.jpg TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:"submit send captcha" ATTR=VALUE:Send TAG POS=6 TYPE=TD ATTR=* EXTRACT=TXT wait seconds=3 SET !VAR1 {{!EXTRACT}} TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:account ATTR=ID:Passwd CONTENT="my password" TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:account ATTR=ID:PasswdAgain CONTENT="my password" TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:account ATTR=ID:Email CONTENT="email" TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:account ATTR=ID:newaccountcaptcha CONTENT={{!var1}} wait seconds=2 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:account ATTR=ID:submitbutton Ok.Some times captcha is incorrect in form and it gives me one message like that " The characters you entered are wrong " .How can i repeat these steps again with javascript? I'm only interested in the preventive methods cauze iMacros is interesting analog then other programs. Thanks you guys.
You have an example here how you can use JavaScript Scripting and make nested loops. Nested loop in iMacros (2nd loop)
iMacros ondialog conditional statement
I'm trying to make iMacros send me an email, if after login I get a dialog. In this case its a warning that I should update my password before it expires. I would like some output to php that I can use to send the email. I'm presently able to get getLastExtract but nothing in the returned array mentions the dialog in any way. This is the script so far: CODE: SET !REPLAYSPEED FAST TAB T=1 TAB CLOSEALLOTHERS URL GOTO=[URL] SET !EXTRACTDIALOG YES TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:adminLogin ATTR=ID:username CONTENT=[username] SET !ENCRYPTION NO ONDIALOG POS=1 BUTTON=NO TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:adminLogin ATTR=ID:password CONTENT=[password] TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:adminLogin ATTR=VALUE:Login