Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject JS code in CasperJS script #31

Open
jcontesse opened this issue Oct 28, 2016 · 2 comments
Open

Inject JS code in CasperJS script #31

jcontesse opened this issue Oct 28, 2016 · 2 comments

Comments

@jcontesse
Copy link

I would like to inject JS code to the final script to do things not provided in this wrapper like:

casper.page.paperSize = {
    width: (8.5 * 96) + 'px',
    height: (11 * 96) + 'px',
    orientation: 'portrait',
    margin: '0px'
}

or any other code that might be needed. Something like:

$casper->addToScript(<<<FRAGMENT
... JS code ...
FRAGMENT);
@jcontesse jcontesse changed the title Iinject JS code CasperJS script Inject JS code CasperJS script Oct 28, 2016
@jcontesse jcontesse changed the title Inject JS code CasperJS script Inject JS code in CasperJS script Oct 28, 2016
@alwex
Copy link
Owner

alwex commented Oct 31, 2016

Sounds like a good idea to be able to "support new casper JS features" between updates.
Can you open a pull request?

@alwex
Copy link
Owner

alwex commented Feb 20, 2017

Hi,

I have released v1.3.0 that come with this feature.
I hope it is what you are after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants