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:
[login to view URL](function(){
counter = 0;
});
[login to view URL](function(){
counter++;
[login to view URL]('Checking for too many keywords: ' + counter);
});
[login to view URL](1000, function(test){
if([login to view URL]('We can only show forecasts for up to 3,000 keywords', 'page contains more than 3000 keywords')){
if(counter >= 2){
[login to view URL]('Too Many Keywords');
screenshot('too_many_kewords');
[login to view URL]();
}else{
[login to view URL]("keyword_total_ok");
}
}
});
Here is the error:
TypeError: 'undefined' is not a function (evaluating '[login to view URL]('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!
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 many keywords on the page.
Look forward to hearing from you.
Will
$111 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
6 freelancers están ofertando un promedio de $138 USD por este trabajo
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
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 you might be using in wring way. If you are interested let us know
Thank You