Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    How to use JSON data in Casperjs Script

    In Magento, there are various “repetitive” tasks to check such as testing with different input values. These repetitive actions take a lot of time. To do this we can use JSON data in CasperJs script.

    Use of JSON data in CasperJs Script.

    Here I have created a login.json file which contains 3 key i.e. link, email & password with their respective values, which is used for the login process.


    Passed values in CasperJs script: Here I have created json object and assigned login.json to json object through require method. Then created email and password object and assigned the value of email key and password key respectively and called the link key (Magento frontend login page link) for starting the login process.


    For complete Magento2 frontend login process check our blog How To SignIn Magento2 Frontend Using CasperJS

    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again