You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The eval argument doesn't work for running javascript in the webshot() function.
When I try the example cited in the documentation (code below), a screenshot is taken, but the username and password are not filled in. I have also tested writing other javascript outside of webshot and it functions as expected, but as soon as I put it in webshot, it stops working.
webshot("http://www.reddit.com/", "reddit-input.png",
selector = c("#search", "#login_login-main"),
eval = "casper.then(function() {
// Check the remember me box
this.click('#rem-login-main');
// Enter username and password
this.sendKeys('#login_login-main input[type=\"text\"]', 'my_username');
this.sendKeys('#login_login-main input[type=\"password\"]', 'password');
// Now click in the search box. This results in a box expanding below
this.click('#search input[type=\"text\"]');
// Wait 500ms
this.wait(500);
});"
)```
The text was updated successfully, but these errors were encountered:
I'm trying to tailor this example for my own project.
Did you have a problem with the this.click commands?
I can get the sendkeys to work using this.sendKeys('input[name =searchString]', 'waitati');
but not the this.click. I am trying to make it click a button to compete the search.
Any help would be appreciated.
The eval argument doesn't work for running javascript in the webshot() function.
When I try the example cited in the documentation (code below), a screenshot is taken, but the username and password are not filled in. I have also tested writing other javascript outside of webshot and it functions as expected, but as soon as I put it in webshot, it stops working.
The text was updated successfully, but these errors were encountered: