On Thursday, 22 November 2012 at 22:30, planon wrote:
I have been trying to do something that's eluded my understanding so far, and that's why I am turning to this list for help. What I want to do is to inject a javascript file to a page loaded by a Cucumber step after it's been loaded by Cucumber.
This file would include some stubs for an ajax call to an external service, so it has to be executed after all the scripts on the page have finished loading. I understand I can use `page.evaluate_script('4 + 4')`, but I am trying to figure out I could use that to evaluate the script in a Cucumber hook, and make sure it's not loaded before the scripts on that page are finished loading.Thanks!
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
I have been trying to do something that's eluded my understanding so far, and that's why I am turning to this list for help. What I want to do is to inject a javascript file to a page loaded by a Cucumber step after it's been loaded by Cucumber. This file would include some stubs for an ajax call to an external service, so it has to be executed after all the scripts on the page have finished loading. I understand I can use `page.evaluate_script('4 + 4')`, but I am trying to figure out I could use that to evaluate the script in a Cucumber hook, and make sure it's not loaded before the scripts on that page are finished loading.
Thanks!--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en