<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Preetham Kalpuri</title>
    <description>The latest articles on Forem by Preetham Kalpuri (@preetham_kalpuri_d42a8508).</description>
    <link>https://forem.com/preetham_kalpuri_d42a8508</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1990409%2Fd8bf3d3e-eebf-4c50-9d6f-648457eaa360.jpg</url>
      <title>Forem: Preetham Kalpuri</title>
      <link>https://forem.com/preetham_kalpuri_d42a8508</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/preetham_kalpuri_d42a8508"/>
    <language>en</language>
    <item>
      <title>Playwright - Remember me functionality</title>
      <dc:creator>Preetham Kalpuri</dc:creator>
      <pubDate>Wed, 28 Aug 2024 06:17:41 +0000</pubDate>
      <link>https://forem.com/preetham_kalpuri_d42a8508/playwright-remember-me-functionality-1hhc</link>
      <guid>https://forem.com/preetham_kalpuri_d42a8508/playwright-remember-me-functionality-1hhc</guid>
      <description>&lt;p&gt;Hello Team, I have a scenario i.e. Automate remember me Toggle Functionality.&lt;/p&gt;

&lt;p&gt;Below are the steps executed manually: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. I will be launching an application
2. Once launched I will be logging into application by passing user name and password and checking the toggle i.e. remember me toggle. 
3. Post successful login I will be closing the browser
4. I would open the browser again 
5. I Will be launching the same application (Navigating to URL), so It would be logged in. 
6.Here I will be trying to access any personal information it would ask for the password authentication again on the same session.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;So this the manual execution and it is working as expected. When it comes to automation, it is not working as expected.&lt;/p&gt;

&lt;p&gt;Below is the script executed in playwright:&lt;br&gt;
            const loginInstance = featureInstances['login'] as Login;&lt;br&gt;
            await loginInstance.LoginWithRememberMeToggleOn(userData.emailaddress, userData.password);&lt;br&gt;
            const storageState = await context.storageState();&lt;br&gt;
            console.log(storageState);&lt;br&gt;
            await page.close();&lt;br&gt;
            const newContext = await browser.newContext({ storageState });&lt;br&gt;
            const newPage = await newContext.newPage();&lt;br&gt;
            await loginInstance.ValidateRememberMeLoginToggle(newPage);&lt;/p&gt;

&lt;p&gt;When I am executing in automation, it just launching the application without populating password authentication page.&lt;/p&gt;

&lt;p&gt;Any leads with solution, it would be grateful. Thanks in advance.&lt;/p&gt;

</description>
      <category>playwright</category>
      <category>typescript</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
