{"id":70627,"date":"2017-01-06T13:05:41","date_gmt":"2017-01-06T13:05:41","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=70627"},"modified":"2017-01-06T17:15:57","modified_gmt":"2017-01-06T17:15:57","slug":"login-magento2-frontend-casperjs","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/","title":{"rendered":"How To SignIn Magento2 Frontend Using CasperJS"},"content":{"rendered":"<p>Manual Testing is a time consuming and tough task to do. In manual testing, it happens to do same tests many times like <a href=\"http:\/\/webkul.com\/blog\/signup-magento2-using-casperjs\/\" target=\"_blank\">create a new account<\/a>, sign in, order placement etc for magento2 store, which is boring. There are some good tools available which make it easier. CasperJS is one of them.\u00a0CasperJS comes with a basic testing suite that allows you to run full featured tests without the overhead of a full browser.\u00a0It uses selector and events to do tests.<\/p>\n<p>For the installation and basic CasperJS knowledge, you can check <a href=\"http:\/\/webkul.com\/blog\/functional-testing-casperjs\/\" target=\"_blank\">here<\/a>. Now we\u2019ll proceed with the testing process. Here we\u2019ll learn how we can sign in using CasperJS for magento2 store. This script will also show you proper error messages for wrong inputs<\/p>\n<p>The script procedure is as follows-<br \/>\nOpen home page of your Magento2 store, click on \u201cSignIn\u201d link, Fill Login Form, Click on SignIn button, wait to be redirected to \u201cMy Account Dashboard&#8221; page and then get the title of My account page.<\/p>\n<p>Here we have used some CasperJS methods like-<\/p>\n<p><strong>start()<\/strong>: For Opening Magento2 Store Homepage<\/p>\n<p><strong>casper.cli.get(0)<\/strong>: For getting input from the terminal. Here 0 is an index of input.<\/p>\n<p><strong>waitForSelector()<\/strong>: Waits until an element matching the provided.<\/p>\n<p><strong>click()<\/strong>: method is used to click a link and buttons.<\/p>\n<p><strong>fill()<\/strong>: method is used to fill the forms.<\/p>\n<p><strong>exists()<\/strong>: Checks if any element matches with the provided selector<\/p>\n<p><strong>wait()<\/strong>: wait for given amount of time<\/p>\n<p><strong>bypass()<\/strong>: To Skip a given number of defined navigation steps<\/p>\n<p><strong>fetchText()<\/strong>: Retrieves text of given selector<\/p>\n<p><strong>getTitle()<\/strong>: Retrieves page title<\/p>\n<pre class=\"brush:js\">\/**\r\n* Webkul Software.\r\n*\r\n* @category Webkul\r\n* @package Webkul_CasperJS\r\n* @author Webkul\r\n* @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\r\n* @license https:\/\/store.webkul.com\/license.html\r\n*\/\r\n\r\nvar casper = require('casper').create({\r\n\tverbose: true,\r\n});\r\nvar email = '';\r\nvar password = '';\r\n\r\n\/\/Home page link\r\ncasper.echo('Current Magento2 link is: ' + casper.cli.get(0), \"INFO\");\r\ncasper.start(casper.cli.get(0));\r\ncasper.echo(\"Testing frontend login...\", \"COMMENT\");\r\n\r\n\/\/Go to login page &amp; Fields value assignment\r\ncasper.waitForSelector('body &gt; div.page-wrapper &gt; header &gt; div.panel.wrapper &gt; div &gt; ul &gt; li.authorization-link &gt; a', function () {\r\n\tthis.click('body &gt; div.page-wrapper &gt; header &gt; div.panel.wrapper &gt; div &gt; ul &gt; li.authorization-link &gt; a')\r\n\tif (casper.cli.get(1)) {\r\n\t\temail = casper.cli.get(1);\r\n\t}\r\n\tif (casper.cli.get(2)) {\r\n\t\tpassword = casper.cli.get(2);\r\n\t}\r\n});\r\n\r\n\/\/Login Form Fillup\r\ncasper.waitForSelector('#login-form', function () {\r\n\tthis.echo('Current Page Title is: ' + this.getTitle(), \"INFO\");\r\n\tthis.fill('form#login-form', {\r\n\t\t'login[username]': email,\r\n\t\t'login[password]': password\r\n\r\n\t}, false);\r\n\tthis.echo('Login Form Filled', \"COMMENT\");\r\n});\r\n\r\n\/\/Click Sign In Button\r\ncasper.then(function () {\r\n\tthis.click('#send2');\r\n});\r\n\r\n\/\/Frontend Field validation Check\r\ncasper.then(function () {\r\n\r\n\t\/\/email error massage.\r\n\tif (this.exists('#email-error')) {\r\n\t\tthis.echo('Email:' + this.fetchText('#email-error'), \"ERROR\");\r\n\t\tthis.bypass(1);\r\n\r\n\t}\r\n\r\n\t\/\/Password error massage.\r\n\tif (this.exists('#pass-error')) {\r\n\t\tthis.echo('Password:' + this.fetchText('#pass-error'), \"ERROR\");\r\n\t\tthis.bypass(1);\r\n\t}\r\n});\r\n\r\ncasper.wait(3000, function () {\r\n\tif (email == '') {\r\n\t\tthis.echo('Email Should be required Field');\r\n\t}\r\n\tif (password == '') {\r\n\t\tthis.echo('password Should be required Field')\r\n\t}\r\n\r\n\t\/\/Invalid Login massage.\r\n\tif (this.exists('#maincontent &gt; div.page.messages &gt; div:nth-child(2) &gt; div:nth-child(1) &gt; div &gt; div')) {\r\n\t\tthis.echo(this.fetchText('#maincontent &gt; div.page.messages &gt; div:nth-child(2) &gt; div:nth-child(1) &gt; div &gt; div'), \"INFO\");\r\n\t} else {\r\n\r\n\t\t\/\/Login Successfull.\r\n\t\tthis.echo('Current Page Title is: ' + this.getTitle(), \"INFO\");\r\n\t\tthis.echo(\"Successfully Logged In\", \"COMMENT\");\r\n\t}\r\n});\r\n\r\ncasper.run();<\/pre>\n<p>Now you have to run a command on your terminal-<\/p>\n<p><strong>casperjs\u00a0your_file_name.js http:\/\/your_magento_homepage email_id password<\/strong><\/p>\n<p>Here, you can see the result on your terminal \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-70703\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_005.png\" alt=\"\" width=\"641\" height=\"158\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_005.png 641w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_005-250x62.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_005-300x74.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" loading=\"lazy\" \/><\/p>\n<p>For blank input \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-70702\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_001001.png\" alt=\"\" width=\"642\" height=\"158\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_001001.png 642w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_001001-250x62.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Selection_001001-300x74.png 300w\" sizes=\"(max-width: 642px) 100vw, 642px\" loading=\"lazy\" \/><\/p>\n<p>For invalid email or password \u2013<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-70700\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/InvalidId.png\" alt=\"\" width=\"641\" height=\"148\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/InvalidId.png 641w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/InvalidId-250x58.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/InvalidId-300x69.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" loading=\"lazy\" \/><\/p>\n<p>After running the test script you will get the Dashboard page title if successfully\u00a0logged\u00a0in or error message for wrong inputs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Manual Testing is a time consuming and tough task to do. In manual testing, it happens to do same tests many times like create a new account, sign in, order placement etc for magento2 store, which is boring. There are some good tools available which make it easier. CasperJS is one of them.\u00a0CasperJS comes with <a href=\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":133,"featured_media":70648,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,302],"tags":[3505,976,4310,2070,4309,4311],"class_list":["post-70627","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento","category-magento2","tag-casperjs","tag-login","tag-login-using-casperjs","tag-magento2","tag-signin","tag-signin-using-casperjs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To SignIn Magento2 Frontend Using CasperJS - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To SignIn Magento2 Frontend Using CasperJS - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Manual Testing is a time consuming and tough task to do. In manual testing, it happens to do same tests many times like create a new account, sign in, order placement etc for magento2 store, which is boring. There are some good tools available which make it easier. CasperJS is one of them.\u00a0CasperJS comes with [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-06T13:05:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-01-06T17:15:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Praveen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Praveen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\"},\"author\":{\"name\":\"Praveen\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/44d7dc6184c1ecd37559592845dac385\"},\"headline\":\"How To SignIn Magento2 Frontend Using CasperJS\",\"datePublished\":\"2017-01-06T13:05:41+00:00\",\"dateModified\":\"2017-01-06T17:15:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\"},\"wordCount\":330,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"keywords\":[\"casperjs\",\"login\",\"login using casperjs\",\"Magento2\",\"SignIn\",\"signin using casperjs\"],\"articleSection\":[\"magento\",\"Magento2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\",\"url\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\",\"name\":\"How To SignIn Magento2 Frontend Using CasperJS - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"datePublished\":\"2017-01-06T13:05:41+00:00\",\"dateModified\":\"2017-01-06T17:15:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To SignIn Magento2 Frontend Using CasperJS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/44d7dc6184c1ecd37559592845dac385\",\"name\":\"Praveen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff264a1c1619d18f89b3cb47cc36435f919cff6e7f38500f4bd89b1f346e028a?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff264a1c1619d18f89b3cb47cc36435f919cff6e7f38500f4bd89b1f346e028a?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Praveen\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/praveen-sagar643\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To SignIn Magento2 Frontend Using CasperJS - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/","og_locale":"en_US","og_type":"article","og_title":"How To SignIn Magento2 Frontend Using CasperJS - Webkul Blog","og_description":"Manual Testing is a time consuming and tough task to do. In manual testing, it happens to do same tests many times like create a new account, sign in, order placement etc for magento2 store, which is boring. There are some good tools available which make it easier. CasperJS is one of them.\u00a0CasperJS comes with [...]","og_url":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-01-06T13:05:41+00:00","article_modified_time":"2017-01-06T17:15:57+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","type":"image\/png"}],"author":"Praveen","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Praveen","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/"},"author":{"name":"Praveen","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/44d7dc6184c1ecd37559592845dac385"},"headline":"How To SignIn Magento2 Frontend Using CasperJS","datePublished":"2017-01-06T13:05:41+00:00","dateModified":"2017-01-06T17:15:57+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/"},"wordCount":330,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","keywords":["casperjs","login","login using casperjs","Magento2","SignIn","signin using casperjs"],"articleSection":["magento","Magento2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/","url":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/","name":"How To SignIn Magento2 Frontend Using CasperJS - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","datePublished":"2017-01-06T13:05:41+00:00","dateModified":"2017-01-06T17:15:57+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/01\/Magneto-Code-Snippet-1.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/login-magento2-frontend-casperjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To SignIn Magento2 Frontend Using CasperJS"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/44d7dc6184c1ecd37559592845dac385","name":"Praveen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ff264a1c1619d18f89b3cb47cc36435f919cff6e7f38500f4bd89b1f346e028a?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff264a1c1619d18f89b3cb47cc36435f919cff6e7f38500f4bd89b1f346e028a?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Praveen"},"url":"https:\/\/webkul.com\/blog\/author\/praveen-sagar643\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/70627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/133"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=70627"}],"version-history":[{"count":11,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/70627\/revisions"}],"predecessor-version":[{"id":70847,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/70627\/revisions\/70847"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/70648"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=70627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=70627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=70627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}