Home > Casper Error > Casper Error No Steps Defined Aborting

Casper Error No Steps Defined Aborting

here for a quick overview of the site Help Center Detailed answers to any questions you might have a peek at this web-site have Meta Discuss the workings and policies of this

Casperjs Exit

site About Us Learn more about Stack Overflow the company Business Learn more casperjs options about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x casperjs start Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.3 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Pass URL

Casperjs Test

to CasperJS via CLI up vote 3 down vote favorite 1 I'm using CasperJS to evaluate a webpage. What I would like to do is to let me pass an argument that is a URL, have CasperJS download and evaluate the page, and output to standard out the webpage so I can use it in a BaSH script. Here is my code so far

Casper Waitforselector

for Casper: var casper = require('casper').create(); var url = casper.cli.args; casper.start(url, function() { this.evaluate(function() { return document; }); this.echo(this.getHTML()); }); casper.run(); This is what I'm seeing once I run it: @:~/spider/casperjs$ casperjs viewsource.js google.com CasperError: No steps defined, aborting /usr/local/src/casperjs/modules/casper.js:1510 in run ~/spider/casperjs/viewsource.js:10 Help please. javascript casperjs share|improve this question edited Mar 24 '14 at 8:27 Brice Favre 1,2271330 asked Mar 23 '14 at 3:50 MoneyBag 6317 Possible duplicate of How to pass a variable to a CasperJS script through the command line? –Ciro Santilli 烏坎事件2016六四事件 法轮功 Nov 17 '15 at 21:48 add a comment| 3 Answers 3 active oldest votes up vote 6 down vote If you want to name your argument : command : casperjs viewsource.js --url="http://YourUrl.com" script : var mainUrl = casper.cli.get("url"); casper.start(mainUrl) .then(......) share|improve this answer answered Mar 24 '14 at 17:03 Fanch 2,324938 May be, a small help from my end, if you want to validate the above code with this additional snippet: if (!casper.cli.has("url")) { casper.echo("\nUsage:casperjs viewsource.js --url=http://YourUrl.com/").exit(); } This would ensure that your below code executes, only if --url is passed in CLI argument list. Hope this helps. &ndas

Contents

Sign in Pricing Blog Support Search GitHub This repository Watch 66 Star 1,734 Fork 162 garris/BackstopJS Code Source Issues 61 Pull requests 9 Projects 0 Pulse Graphs casperjs examples New issue Version 0.4.0 stop working #34 Closed dendril opened this Issue

Casperjs Github

Feb 9, 2015 · 6 comments Labels question Milestone No milestone Assignees garris 3 participants dendril casperjs tutorial commented Feb 9, 2015 Hey, I did not review all the changes between 0.3.0 and 0.4.0, but seems the basic command gulp reference is throwing: [15:21:09] Finished 'reference' after 5.04 ms http://stackoverflow.com/questions/22586852/pass-url-to-casperjs-via-cli CasperJS: CREATING NEW REFERENCE FILES CasperJS: CasperError: No steps defined, aborting CasperJS: /usr/lib/node_modules/casperjs/modules/casper.js:1505 in run /home/user/projects/myCoolProject/node_modules/backstopjs/capture/genBitmaps.js:187 Testing script failed with code: 1 Does anyone know which could be the problem? In the meantime, I'm going to continue working with 0.3.0 till I get time to debug this issue. Thanks! BackstopJS owner garris commented Feb 9, 2015 Hi @dendril, thanks for filing this. https://github.com/garris/BackstopJS/issues/34 The config files are slightly different from version 0.3.0 & 0.4.0 and this could cause the issue. If you run gulp genConfig the app will write a default configuration file at the root of your project. (Please be careful, this will overwrite any config existing at that location.) Then you can try running gulp reference and gulp test. It should work then. Please let me know if that fixes the issue. Thanks! GS garris self-assigned this Feb 9, 2015 garris added the question label Feb 9, 2015 lewisnyman commented Feb 9, 2015 Maybe we could add more useful error messages for people who are caught by the upgrade? … On Monday, 9 February 2015, Garris ***@***.***> wrote: Hi @dendril , thanks for filing this. The config files are slightly different from version 0.3.0 & 0.4.0 and this could cause the issue. If you run gulp genConfig the app will write a default configuration file at the root of your project. (Please be careful, this will overwrite any config existing at that location.) Then you can try running gulp reference and gulp test. It shou

Lines 2706 MD5 Hash 70e217597e077315cfd9dc39a9049c56 Repository https://github.com/canadaduane/casperjs.git View Raw File Find Similar Files View File Tree | Open JSFiddle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 have a peek here 24 25 26 27 28 29 30 31 32 33 34 35 https://searchcode.com/codesearch/view/66345494/ 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 https://docs.omniref.com/js/npm/sisyphus/0.0.4/symbols/Casper%23run 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 Casper Error 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 Casper Error No 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 4

Filestoggle dropdownLoading... Follow sisyphusCheck it out:Want Omniref for your own repositories? Now you can have it!run(onComplete, time)Want Omniref for your team's code?We've just launched Omniref professional, which gives you all of the annotation, Q&A and code review features of Omniref, for your own code — in any language!Omniref is the perfect tool for code review, TODO lists, Q&A, and more, and it works seamlessly with your GitHub repositories. Try it today:Get Started Now!DocsQ & A Runs the whole suite of steps. Show MoreBe the first to create an annotation!Ask a question about Casper#run PreviewCancelNeed Help?Trying to understand this code?Know something that you want to share?Ask a QuestionLeave a NoteOmniref is the largest and most comprehensive knowledge base for Ruby programmers. We have documentation and annotated source for all versions of Ruby and every RubyGem, and an active community of experts who contribute their knowledge and answer questions. Join us! PreviewCancel↤ Hide DocsHide Code ↦vendor/casperjs/modules/casper.jsCasper.prototype.run = function run(onComplete, time) { "use strict"; this.checkStarted(); if (!this.steps || this.steps.length < 1) { throw new CasperError('No steps defined, aborting'); } this.log(f("Running suite: %d step%s", this.steps.length, this.steps.length > 1 ? "s" : ""), "info"); this.emit('run.start'); this.checker = setInterval(this.checkStep, (time ? time: 100), this, onComplete); return this;};×Ask Questions and Leave Notes About CodeHave a question about how something works? Been caught by a tricky bug in the past? Know something about this code that you'd like to share with others? Now you can add annotations to all of the code listings on Omniref. Share your knowledge and become better known in the Ruby community!To ask a question or leave a note:Highlight the code.Enter your comments using plain text or markdown.Submit! Your contribution will be visible to everyone.Follow @omniref on TwitterAboutBlogTutorialsForumTeamLegalContactUsGemsNPMMeteorGitHubSite design and logo © 2016 Omniref.comUser contributions licensed under the cc by-nc-sa 4.0 license. ×Sign In to ContinueWelcome! Omniref is free for everyone, but registered users get extra privileges like posting, commenting and voting.Sign in with GitHubSign in with GoogleSign in with FacebookBy creating an Omniref account, you agree that you accept ourour terms of service and privacy policy.×Send us your feedback!SubjectProblem Suggestion Question OtherEmailComment CloseSend feedback