Menu Close
    Hire us 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.

    login.json


    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.

    signin.js

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

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close