Not finding an element on the page

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Not finding an element on the page

by jestice on Fri Oct 07, 2016 2:13 pm

Not finding an element on the page freebitco.in
Code: Select all
var element = window.document.getElementById('videoPoster');
if(element){iimPlay(
`CODE:
SET !ERRORIGNORE YES
WAIT SECONDS=2
FRAME F=2
TAG POS=1 TYPE=DIV ATTR=ID:videoPoster
WAIT SECONDS=15
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:adcopy_response CONTENT=januvia
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:free_play_form_button
WAIT SECONDS=10
`);}
else {iimPlay(
`CODE:
SET !ERRORIGNORE YES
FILEDELETE NAME=C:\\CAPCH\\BotCaptcha
ONDOWNLOAD FOLDER=C:\\CAPCH\\BotCaptcha FILE=free2.jpg   
WAIT SECONDS=15
TAG POS=1 TYPE=DIV ATTR=ID:adcopy-puzzle-image CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
WAIT SECONDS=5
TAB OPEN
TAB T=2
URL GOTO=http://imacros2.2captcha.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:getcapcha.php ATTR=TYPE:text&&VALUE:&&NAME:key&&SIZE:64 CONTENT=*
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:getcapcha.php ATTR=NAME:file CONTENT=C:\\CAPCH\\BotCaptcha\\free2.jpg
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:getcapcha.php ATTR=TYPE:submit&&VALUE:recognize
WAIT SECONDS=15
SET !EXTRACT NULL
TAG POS=1 TYPE=* ATTR=TXT:* EXTRACT=TXT
WAIT SECONDS=1
TAB CLOSE
TAB T=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:adcopy_response CONTENT={{!EXTRACT}}
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:free_play_form_button
WAIT SECONDS=10
`);}


Element 100% there on the page!
also I tried to do so:
Code: Select all
var macro;

macro ="CODE:";
macro +="TAG POS=1 TYPE=DIV ATTR=CLASS:videoPoster CONTENT=EVENT:MOUSEOVER ";

var ret=null;

ret=iimPlay(macro);

if(ret>0)
{iimPlay(
`CODE:
SET !ERRORIGNORE YES
WAIT SECONDS=2
FRAME F=2
TAG POS=1 TYPE=DIV ATTR=ID:videoPoster
WAIT SECONDS=15
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:adcopy_response CONTENT=januvia
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:free_play_form_button
WAIT SECONDS=10
`);

}
else
{iimPlay(
`CODE:
SET !ERRORIGNORE YES
FILEDELETE NAME=C:\\CAPCH\\BotCaptcha
ONDOWNLOAD FOLDER=C:\\CAPCH\\BotCaptcha FILE=free2.jpg   
WAIT SECONDS=15
TAG POS=1 TYPE=DIV ATTR=ID:adcopy-puzzle-image CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT
WAIT SECONDS=5
TAB OPEN
TAB T=2
URL GOTO=http://imacros2.2captcha.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:getcapcha.php ATTR=TYPE:text&&VALUE:&&NAME:key&&SIZE:64 CONTENT=*
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:getcapcha.php ATTR=NAME:file CONTENT=C:\\CAPCH\\BotCaptcha\\free2.jpg
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:getcapcha.php ATTR=TYPE:submit&&VALUE:recognize
WAIT SECONDS=15
SET !EXTRACT NULL
TAG POS=1 TYPE=* ATTR=TXT:* EXTRACT=TXT
WAIT SECONDS=1
TAB CLOSE
TAB T=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:adcopy_response CONTENT={{!EXTRACT}}
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:free_play_form_button
WAIT SECONDS=10
`);
}
jestice
 
Posts: 1
Joined: Fri Oct 07, 2016 2:04 pm

Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

-->