wch / webshot

Take screenshots of web pages from R
http://wch.github.io/webshot/
228 stars 40 forks source link

.click to work #47

Open aguy004 opened 6 years ago

aguy004 commented 6 years ago

Hi all, I am fairly new to this and so any help would be appreciated.

I am trying to write a simple code to understand how this all works and then I will progress it further. For the learning process I am using a site called: www.trademe.co.nz and I am wanting to take a screenshot of what the search function returns. I will then progress it to enter a username and password for a different project (internal website so I can't share it).

My code so far is below but whatever I try to do, I can't get it to click down on the search button (ignore code I have there for it now, it doesn't work) next to where the text is entered. Can someone please help me out? I have the devel version of webshot

Configuration

library(webshot)

webshot("https://www.trademe.co.nz/", eval = "casper.then(function() {

 this.sendKeys('input[name =searchString]', 'waitati');

    //this.click('#field field-right');
    // Wait 500ms
    this.wait(500);
    });"

)