Search code examples
web-scrapingphantomjscasperjs

How to set value of an input tag in casperJs


I have input element as shown :

<input type="text" class="bg-white" id="couponCode" value="">

How can i set/fill its value using casperJs


Solution

  • Using casper.sendKeys('selector', value);

    http://casperjs.readthedocs.org/en/latest/modules/casper.html#sendkeys