已完成

Help With Casperjs code - getting error

Hello,

I am trying to evaluate whether or not specific text appears on a webpage. If it is present the script should exit if not the script should continue.

Here is the problem code:

[url removed, login to view](function(){

counter = 0;

});

[url removed, login to view](function(){

counter++;

[url removed, login to view]('Checking for too many keywords: ' + counter);

});

[url removed, login to view](1000, function(test){

if([url removed, login to view]('We can only show forecasts for up to 3,000 keywords', 'page contains more than 3000 keywords')){

if(counter >= 2){

[url removed, login to view]('Too Many Keywords');

screenshot('too_many_kewords');

[url removed, login to view]();

}else{

[url removed, login to view]("keyword_total_ok");

}

}

});

Here is the error:

TypeError: 'undefined' is not a function (evaluating '[url removed, login to view]('We can only show forecasts for up to 3,000 keywords', 'page contains more than 3000 keywords')')

I pretyt mush don't know what I am doing. Just messing around really and trial and error trying to find something that works but it could take me years :-)

If there is a better way to check for the text I'm fine with that. Just need a solution ASAP.

Thanks!

技能: CasperJS, JavaScript

查看更多: getting source code exe file, error code firepay, getting source code exe, error code 106601, getting source code exe java, char error code doesnt support property method, outlook try catch error code, authorize net error code 123, mysql error code 1054 using case, post external website error code

关于此雇主:
( 172个评论 ) Andalusia, United States

项目ID: #8204704

授予:

wismy

HI, I can have a quick look at this now if you like? I work with Javascript and JQuery on a daily basis. I can also just give you another function to check the keyword count and return the message if there are too 更多

$111 USD 在1天内
(0条评论)
0.0

6 威客就此工作平均出价 $138

dagdya99

Hi, I'm interested to work on your project. Please let me know if you require any detailed information. Waiting for your reply Thanks Dev

$150 USD 在3天内
(34条评论)
5.2
buzzcoder

Hi, Can you give me current casperjs code with URL of website you intend to test? I can help you to resolve this issue, but its better if I can know exactly website + keyword you used for testing. Thanks, Duy

$222USD 在1天里
(5条评论)
4.9
anamaria1979

Propunerea nu a fost încă furnizată

$147 USD 在0天内
(17条评论)
4.8
bharathreddy11

Hi, We are professional JavaScript and Angular JS Developers, we assure you 100% best solutions, the error is simply saying the class or object "test" does not have any method with name assertTextExists, or if it exist 更多

$100USD 在1天里
(1条评论)
1.2
enriquethumar

Hello sir, I have 6+ years experience in web fields,and 3+ years of experience in private company having 500+ employee as a Team leader -open source. We are virtual group of coders you will find all coders under one 更多

$100 USD 在3天内
(1条评论)
0.0