<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Chaya Thilakumara - Medium]]></title>
        <description><![CDATA[This blog is for the beginners in software testing. It aims to bridge the gap between the theoretical knowledge that the beginners have and its real-world implementation. - Medium]]></description>
        <link>https://medium.com/chaya-thilakumara?source=rss----45c3990b2919---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Chaya Thilakumara - Medium</title>
            <link>https://medium.com/chaya-thilakumara?source=rss----45c3990b2919---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:36:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/chaya-thilakumara" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using AI to Build Effective Mind Maps]]></title>
            <link>https://medium.com/chaya-thilakumara/using-ai-to-build-effective-mind-maps-8c6ea75070f0?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/8c6ea75070f0</guid>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Mon, 25 Nov 2024 08:17:51 GMT</pubDate>
            <atom:updated>2024-11-25T08:17:51.371Z</atom:updated>
            <content:encoded><![CDATA[<p>Mind maps are visual diagrams designed to help organize information in a way that is easy to understand. They allow for a clear and structured representation of ideas, making it simpler to connect and analyze complex concepts.</p><h4>How Mind Maps Benefit Testing</h4><ol><li><strong>Organizing Test Ideas Clearly</strong></li></ol><p>Mind maps help organize your test ideas in a way that’s easy to understand and follow. For example, if you’re testing an admin site “<strong>Advance</strong> S<strong>earch Option</strong>”, you can create branches for each filter like “<strong>Order Id</strong>”, “<strong>Order Received Date</strong>”, “<strong>Last Updated Date</strong>”, “<strong>Order Status</strong>”, “<strong>Order Type</strong>”, “<strong>Source System</strong>”, and “<strong>Payment Method</strong>”. Under each filter, list out the options and expected behaviors (example: dropdowns, date pickers). Then, the branches can also include steps for what happens when the admin performs an advanced search and selects different orders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRQ-TTg9jzmGA22q0l3mSQ.png" /><figcaption>A mind map for the admin’s advanced search can outline the process of selecting orders using different filters</figcaption></figure><p>This helps visualize and organize all the test cases related to the advance search feature. This makes it easy to see all the areas that need testing, ensuring you don’t miss anything.</p><p><strong>2. Simplifying Complex Tests</strong></p><p>In the mind map for testing <strong>Advance Search</strong> functionality, you can organize tests into categories like “<strong>Positive</strong>” (example: ensuring the filters work as expected), “<strong>Negative</strong>” (example: testing invalid advance search criteria), and “<strong>Regression</strong>” (example: checking if new filters break existing features).</p><p>You can prioritize these tests by color coding, <strong>red</strong> for critical tests, <strong>yellow</strong> for medium priority tests and <strong>green </strong>for low priority.</p><p>Additionally, dependencies can be shown, such as how the “<strong>Advance Search</strong>” action depends on the proper functioning of all filter dropdowns (like “<strong>Orders</strong>” and “<strong>Source System</strong>”). This way, the mind map helps keep everything organized and ensures no critical tests are missed.</p><p><strong>3. Generating Test Scenarios</strong></p><p>When testing the <strong>Advance Search</strong> functionality, think of all possible user actions, such as selecting different filters (e.g., “<strong>Order Received Date</strong>”, “<strong>Payment Method</strong>”) and entering search criteria. Each branch in the mind map represents a different scenario, including edge cases like selecting invalid dates or entering incorrect data.</p><p>Test boundaries by considering what happens with valid inputs (correct dates, valid order IDs) and invalid inputs (incorrect formats, empty fields). Don’t forget negative cases, such as no results returned or system errors when clicking “<strong>Search</strong>”.</p><p>Also, include non-functional tests for performance (how fast results load), security (ensuring data is protected during search), and usability (how easy it is for users to interact with the filters and find relevant orders).</p><h4>The Role of AI in Test Scenario Mind Mapping</h4><h4>Challenges in Creating Test Scenarios Manually</h4><p>As Quality Engineers, we face some challenges when manually creating test scenarios:</p><ol><li><strong>We Can’t Think of All Possible Test Scenarios</strong>: It’s hard to identify every single test case, especially for large, complex systems.</li><li><strong>Time-Consuming</strong>: Creating test cases manually takes a lot of time, especially when dealing with many features.</li><li><strong>Identifying Edge Cases</strong>: It’s difficult to think of all possible edge cases — those rare or unusual situations that can break the system.</li><li><strong>Inconsistency</strong>: The test scenarios can vary depending on who is creating them or the situation at hand. Different people might approach the same problem in different ways, leading to inconsistency.</li></ol><h4>AI as an Efficient Booster in Test Scenario Creation</h4><p>AI can help solve many of these problems by making test scenario generation faster and more reliable:</p><ol><li><strong>Quick Requirement Analysis</strong>: AI can quickly analyze the requirements of a system and understand what needs to be tested.</li><li><strong>Identify Potential Test Cases</strong>: AI can scan through the requirements and find test scenarios much faster than humans. It can pick up things that might be overlooked manually.</li><li><strong>Automatic Test Suggestions</strong>: AI can automatically suggest test cases, saving a lot of manual effort. It uses patterns and data to predict what needs testing.</li><li><strong>Time and Effort Savings</strong>: With AI handling much of the work, the process is much faster. This saves time and reduces the effort needed from human testers.</li></ol><h4>Automation and Collaboration Benefits</h4><p>AI can also make the whole process of creating test scenarios more efficient and collaborative:</p><ol><li><strong>Generate Initial Mind Maps</strong>: AI can create an initial mind map for the test scenarios, giving the team a starting point.</li><li><strong>Collaborative Refinement</strong>: Once AI generates the first draft of test cases, the QE team can work together to refine and improve the map. This helps ensure that no important test case is missed.</li></ol><h4>Steps to Create Mind Maps Using AI</h4><h4>Step 1: Define the Test Scenario</h4><p>Start by looking at the Jira description and clearly identify what needs to be tested. Focus on the specific area or feature you’re testing.</p><p>Gherkin scenario for testing “<strong>Order Status” </strong>in Advance Search feature:</p><blockquote><strong>Scenario 01: ‘Order Status’ option to be displayed as a advance search option</strong></blockquote><blockquote><strong>GIVEN</strong> Author has already submitted an order through the author’s dashboard</blockquote><blockquote><strong>WHEN</strong> Admin attempts to make a search through advance search functionality in the admin portal</blockquote><blockquote><strong>THEN</strong> admin must be displayed with a new drop-down selection option as “Orders” in the “Search for” section in Admin portal</blockquote><blockquote><strong>AND</strong> the “Order Status” filter must have the following sub-filters as drop down fields : Order Status as “Pending”, “Validated”, “Completed” and “Cancelled”</blockquote><blockquote><strong>WHEN</strong> the admin user enters the relevant search criteria</blockquote><blockquote><strong>AND</strong> clicks on the “Search” button,<br><strong>THEN</strong> admin will see the orders that align with the Order Status</blockquote><h4>Step 2: Use AI Tools to Create the Mind Map</h4><p>Take the test scenario you’ve defined and input it into an AI tool like ChatGPT/Copilot. Ask it to generate a mind map from the provided information in markdown format.</p><blockquote>To create a <strong>mind map</strong> in Markdown format, it’s not strictly necessary to use Gherkin format. However, it can be helpful if you want to define the <strong>test scenarios</strong> in a structured way that mimics how behavior-driven development (BDD) scenarios are written. Gherkin is commonly used in BDD to specify features in plain language (using <strong>Given-When-Then</strong> statements), but mind maps generally focus on organizing ideas and concepts.</blockquote><p>To represent the <strong>Gherkin scenario</strong> in <strong>Markdown</strong> format for the <strong>Order Status</strong> filter in the <strong>Advance Search</strong>, can structure it like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*26yYVT-X_oOg95zYLXiQiw.png" /><figcaption>Markdown format for the Order Status filter in the Advance Search</figcaption></figure><blockquote><strong>Markdown</strong> for Gherkin scenarios provides a clear, structured, and easy-to-read format that aligns with <strong>Behavior-Driven Development (BDD)</strong> principles. It organizes test cases into manageable steps (Given-When-Then), making them more understandable and accessible for teams. Markdown is lightweight, widely supported across various tools and platforms, and ideal for collaboration, version control, and documentation. By using Markdown, teams can maintain and track test scenarios efficiently while ensuring consistency and ease of sharing in both development and testing environments.</blockquote><h4>Step 3: Export the Mind Map</h4><p>Once the mind map is generated, copy the markdown code and paste it into a markdown editor. From there, export the mind map as a Markdown (.md) file. The Markdown editor I’m using is Dillinger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rg-_UWGkrdBfv2vA6gUS1g.png" /><figcaption>Markdown Editor : Dillinger</figcaption></figure><h4>Step 4: Import and Refine the Mind Map</h4><p>Import the saved Markdown file into your mind mapping tool. Now, you can refine and adjust the mind map as needed. The mind mapping tool I’m using is XMind.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hFT0TC6d-hHIIyVg_DQvMQ.png" /><figcaption>Mind map for the Order Status filter in the Advance Search</figcaption></figure><h4>Generating Test Cases from the Mind Map</h4><ol><li><strong>Automated Test Case Creation</strong> After the mind map is created, AI can automatically generate detailed test cases from each branch of the mind map. This ensures all test scenarios are covered.</li><li><strong>Export Test Cases in CSV Format</strong> AI can also convert these test cases into a CSV file, making it easy to organize, track, and import them into test management tools like Jira or TestRail.</li><li><strong>Customize the Test Cases</strong> The QE team can further adjust and customize the test cases in the CSV file to make sure they match the project’s needs, testing goals, or any specific requirements.</li></ol><h4>In Summary:</h4><p>AI can take care of the repetitive, time-consuming tasks in test scenario generation, making it faster, more consistent, and more accurate. It allows the QE team to focus on refining the test strategy, while AI handles the heavy lifting of identifying potential test cases and edge scenarios.</p><p>Hope you enjoyed reading this article. Thanks for reading.<br>Let’s meet with another exciting article.</p><p>See you soon !!!! Bye !!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c6ea75070f0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/using-ai-to-build-effective-mind-maps-8c6ea75070f0">Using AI to Build Effective Mind Maps</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking Success with Agile Practice]]></title>
            <link>https://medium.com/chaya-thilakumara/unlocking-success-with-agile-practice-97546108945c?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/97546108945c</guid>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Fri, 11 Oct 2024 17:20:26 GMT</pubDate>
            <atom:updated>2024-10-11T17:19:37.120Z</atom:updated>
            <content:encoded><![CDATA[<p>Agile is becoming more popular because it works well in flexible environments where team members quickly take action to complete tasks as things change. Agile project management breaks large projects into smaller, manageable tasks and completes them in short cycles. This helps teams work faster, adapt to changing needs, and improve their overall workflow.</p><h3><strong>Inspect &amp; Adapt</strong></h3><p>Before starting a new PI planning session, the last meeting of the previous PI is the “Inspect and Adapt” session. This meeting includes a burndown review and system demos presented by each team for the entire PI, followed by a retrospective focused on the previous PI.</p><h3>PI Planning Activities</h3><p>In PI planning, the team reviews the product roadmap for the next three months. The Product Owners provide the epics, and the Business Analysts categorize the user stories and share them with the teams.</p><ol><li><strong>Kickoff/Overviews</strong></li></ol><ul><li>PI planning begins with a kickoff/overview meeting. The business overview includes the status and feedback on delivered features, achievements of business objectives, and a discussion of upcoming plans, followed by a Q&amp;A session. Next, the Product Owner provides an overview and walkthrough of the business feature scope for the PI, along with another Q&amp;A session. After that, the architecture, tech, and quality engineering teams present their updates, covering architectural changes, the technical feature scope, and quality engineering initiatives for the PI, followed by another Q&amp;A</li></ul><p>2. <strong>Teams Breakouts</strong></p><ul><li>Then, the team breaks out into smaller groups to estimate their stories for the PI. Each team meets with the Product Manager, Product Owner, Architect, and Tech Lead to discuss any open questions and concerns that need to be addressed.</li><li>Then, considering the team’s capacity, holidays, and expected absences, team decide which stories will be included in the sprints.</li><li>In the backlog grooming session, the team can estimate the story based on the discussion, but this will not be a detailed estimation.</li><li>Once the team arranges the stories and tasks for each sprint, they present the plan to the product team to gather their suggestions and ideas related to the next PI.</li></ul><p>3. <strong>Plan Presentations</strong></p><ul><li>During the Plan Presentations, teams present their plans, review the PI objectives, and highlight any risks or issues. If management approves the plans and time permits, the team can conduct a voting session and a retrospective, marking the end of Presentation Day.</li><li>In the Team Voting and Retrospective, teams participate in a confidence voting for the PI plan. Votes are given on a scale from 1 to 5, with 5 indicating the highest level of confidence. The retrospective focuses on the PI planning process itself.</li></ul><p>4. <strong>Revised Plan review</strong></p><ul><li>Additionally, if the plans are not approved and there are necessary changes, teams will present their revised plans during the Revised Plan Review, highlighting any risks and issues. If the plans are approved in the plan presentation session, this session will be canceled.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*zLQMqQKOlnW1kJsp.png" /><figcaption>PI planning</figcaption></figure><h3>Backlog Grooming</h3><ul><li>In the middle of the sprint, the team meets regularly to review upcoming sprint tasks based on priority. This ensures that the user stories for the next sprints are ready for planning.</li><li>To clarify any ambiguity, the team reviews each user story for the upcoming sprint based on priority. They go over the business requirements and technical details for the user stories and provide any relevant information.</li><li>In the backlog grooming session, you can estimate the stories using Jira or an online planning poker tool. If you don’t estimate during the grooming session, that’s okay; you can do it in the sprint planning session instead.</li><li>The main purpose of the backlog grooming session is to clarify the upcoming sprint requirements with the BA, discuss any technical or testing difficulties with the team, and identify any precautions needed. If there are clarifications needed from the product team, we communicate those to the BA, who will check with the product team.</li></ul><h3>Daily Stand-Ups / Daily Team Sync</h3><p><strong>Agenda for the Daily Stand-Ups</strong></p><ul><li>Progress updates on sprint items (according to priority) from all team members involved.</li></ul><p><strong>Guidelines for individual updates on a specific sprint item:</strong></p><ol><li>What did you do yesterday that contributed to the progress of this sprint item?</li><li>What will you do today to further the progress of this sprint item?</li><li>Are there any impediments preventing you from making progress on this sprint item?</li></ol><ul><li>A daily stand-up meeting lets the project team talk about the status of the current sprint.</li><li>The team stands together, and each person shares what they accomplished during the sprint since the last stand-up meeting.</li><li>To keep the meetings short and focused, stand-up meetings are limited to 15 minutes.</li><li>Daily stand-up meetings in Agile project management let team members talk openly about any obstacles and share important information.</li></ul><p>Each member answers below three questions during their update:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LKDwXL95pja38e6Y3XCc_Q.png" /><figcaption>Three Questions During Daily Stand-Up Meeting</figcaption></figure><ol><li><strong><em>What did you do yesterday? </em></strong>(Share your progress on the work your doing)</li></ol><p>Example: Yesterday, I started working on the story AS-32324, which is about generating emails for the author registration feature. I created a test matrix for that story and began the automation.</p><p><strong><em>2. What will you do today? </em></strong><em>(Mention the things you plan to accomplish today)</em></p><p>Example: Today, I will continue the automation for the story AS-32324, which is about generating emails for the author registration feature.</p><p><strong><em>3. What (if anything) is blocking your progress? </em></strong>(Is there anything preventing you from getting your work done)</p><p>Example: An error occurred, and I can’t register an author when running the automation tests for story AS-32323, which is about the author registration flow. This flow depends on the current story AS-32324, which is about generating emails for the author registration feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rkOeZzOU7Hqtpz_o.jpg" /><figcaption>Daily Stand-Up Meeting</figcaption></figure><p>By encouraging the team to share short, achievable goals, these three questions help team members take responsibility for their work and commitments.</p><h3>Sprint Planning</h3><p><strong>Agenda for the Sprint Planning Meeting</strong></p><ol><li>Establish team capacity</li><li>User Story analysis and estimating</li><li>Tasking stories</li><li>Provide RCI for the individual stories and sprint commitments</li><li>Commit to sprint goals</li></ol><ul><li>First, the team looks at any stories or tasks that were only partially completed in the previous sprint and need to be carried over. They prioritize that work first.</li><li>The project manager (PM) helps calculate the team’s capacity, taking into account holidays and team member absences.</li><li>Based on the backlog grooming session held in the middle of the previous sprint, the team reviews the sprint stories and tasks during sprint planning to identify the scope, including deadlines and sub-tasks needed to deliver the sprint. If priorities change, the business analyst (BA) informs the team and adjusts the sprint tasks as needed.</li><li>The team then discusses any clarification needed regarding requirements with the BA and addresses technical aspects among themselves. If there are any requirement clarifications or additional information needed from the product team, the BA will check with them.</li><li>Once the team lines up the stories in the sprint based on priority, they estimate any stories or tasks that are not sized or need to change size. This includes any tasks that were carried over and are only partially done, as well as stories where the scope has changed.</li><li>For planning, the team can use Jira or an online planning poker tool. The team estimates only when everyone feels confident they understand the item being estimated. All estimators share their estimates at the same time. If everyone gives the same value, the team agrees on the effort involved. If not, they discuss the differences, focusing on the highest and lowest estimates.</li><li>After calculating the total number of user stories and tasks, the team determines the size of the sprint. Based on the capacity If the planned workload seems overwhelming, team members should raise their concerns. If the planned work exceeds the team’s velocity, the business analyst, product owner, or team can decide which story or task to move to the next sprint.</li><li>If the total size is less than the team’s velocity, they can select additional backlog items to include.</li><li>Additionally, it’s a good idea to provide due dates for the stories. This helps in releasing features independently and verifying that the sizes are accurate.</li><li>The BA gets the RCI (Requirement Clarity Index) from each team member during the sprint planning. Team members need to give a number from 1 to 5, where <strong>1</strong> means “<strong>no idea</strong>”, <strong>2</strong> means “<strong>less clear</strong>”, <strong>3</strong> means “<strong>somewhat clear</strong>”, <strong>4</strong> means “<strong>clear</strong>”, and <strong>5</strong> means “<strong>very clear</strong>”. RCI Requirement index clarity (RCI) is used to measure the clarity of the requirement in a planned sprint story. This will provide a clear picture of whether the particular story is ready for development. If the RCI is 4 or 5, the BA will ask the team member for the reason behind that number and record if there are any concerns in the Jira ticket for the story or task.</li><li>At the end of the sprint planning, the PM also collects the RCI from each team member, considering the overall sprint. This helps provide a clear picture of whether the sprint can be completed without any concerns.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*ejthDJ5SiRYr3a97SNIYtA.png" /><figcaption>Sprint Planning</figcaption></figure><h3>Sprint Review (Demo)</h3><p><strong>Agenda for the meeting Sprint Review</strong></p><ol><li>Progress on Team’s PI Objectives</li><li>Review of Team Risks</li><li>Demo of any features completed in the increment</li></ol><p>Sprint reviews (demo) provide a platform for the Scrum team to show what they have achieved during the sprint while creating opportunities for key stakeholders to review the increments and adjust the product backlog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*2UtcGsQeehZazV09SAhNGg.png" /><figcaption>Sprint Review (Demo)</figcaption></figure><p>The Sprint Review presentation helps product owners to summarize items that are completed, show the finished functionality, confirm the team’s commitment, and provide feedback and suggestions.</p><h3><strong>Retrospective on the sprint</strong></h3><p><strong>Agenda for the meeting</strong></p><ol><li>Review current action items</li><li>Discuss on “What did we do well?”</li><li>Discuss on “What needs to be improved?</li></ol><p>Retrospective board will be shared before the meeting, to enter feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*oBH0zQY4UwskFavdh-aDbA.png" /><figcaption>Sprint Retrospective Meeting Objectives</figcaption></figure><p>The Sprint Retrospective is a regular meeting held at the conclusion of a sprint to review the successes and areas for improvement going forward.</p><p>After a sprint review and before a sprint plan, there is a time-boxed meeting called a sprint retrospective. Its purpose is to:</p><ul><li>Learn how the most recent sprint performed in terms of relationships, processes, people, and tools.</li><li>List and arrange what was effective.</li><li>If something goes wrong, carry out the same. Find areas that could want improvement.</li><li>Make a strategy to enhance your Scrum team’s operation.</li></ul><p>Following are some of the most typical queries regarding Sprint’s retrospective:</p><ol><li><strong>What went well in the sprint? </strong>The success of the iteration can be analyzed by looking at what was done differently to achieve it. Who contributed and how. And what skills, training, and knowledge made the difference?</li><li><strong>What went wrong in the sprint?</strong> Instead of punishing team or individual members, look for things that didn’t go as planned to improve future performance.</li><li><strong>What did we learn?</strong> What did the team learn to improve their way of working in Sprint?</li><li><strong>How should the next sprint play out?</strong> This establishes a corrective action to be performed in the next sprint, prevents the same error from occurring, and makes a successful action a repeatable result.</li></ol><p>In summary, adopting Agile practices can greatly improve how teams manage projects and deliver products. By focusing on teamwork, flexibility, and continuous improvement, organizations can work more efficiently and better meet customer needs. Despite some challenges, the benefits of improved collaboration and quicker responses to change make the Agile approach a valuable choice for any team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97546108945c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/unlocking-success-with-agile-practice-97546108945c">Unlocking Success with Agile Practice</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playwright 103: GitHub Copilot in the Automation Testing]]></title>
            <link>https://medium.com/chaya-thilakumara/playwright-103-github-copilot-in-the-automation-testing-6ecc14e260e9?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/6ecc14e260e9</guid>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Sat, 28 Sep 2024 19:08:10 GMT</pubDate>
            <atom:updated>2024-09-28T19:10:39.705Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome back to my Playwright series! In my previous articles, I provided a thorough introduction to Playwright, covering everything you need to get started from the installation process to running your first test. I also shared how to write a basic test, record a session, and execute your tests effectively. In the second article, I walked you through creating a login test using Playwright, complete with a step-by-step guide.</p><p>First article in this series : <a href="https://medium.com/chaya-thilakumara/playwright-101-an-introduction-3e6f995e65a0">Playwright 101: An Introduction</a></p><p>Second article in this series : <a href="https://medium.com/chaya-thilakumara/playwright-102-a-step-by-step-guide-to-write-a-login-test-dc579c86e299">Playwright 102: A Step-by-Step Guide to Write a Login Test</a></p><p>In this article, I’ll show you how to enhance your Playwright scripts with GitHub Copilot. To get the most out of this content, I recommend reviewing my earlier articles, as they will provide the foundational knowledge you’ll need. So, be sure to check them out before diving in!</p><h4>Overview</h4><ol><li><strong>Introduction to GitHub Copilot</strong></li></ol><ul><li>Key Features of GitHub Copilot</li><li>How GitHub Copilot Supports for Automation Test</li></ul><p>2.<strong> Leverage Copilot to Implement the Playwright Script </strong><a href="https://practicetestautomation.com/practice-test-login/"><strong>Practice Test Login</strong></a><strong> Site</strong></p><ul><li>Test Case: Login to the Application</li><li>Generate Test Script Using GitHub Copilot</li><li>Apply Page Object Model (POM) Using GitHub Copilot</li><li>Group Atomic Steps Using GitHub Copilot</li><li>Generate Test Data File for the Data Used in the Test Case</li></ul><h3>Introduction to GitHub Copilot</h3><p>GitHub Copilot is a smart coding tool created by GitHub and OpenAI. It helps developers by offering code suggestions and autocompletions right in your coding environment (IDE).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-VrX3OR_HmOTpOVhR4_hjg.png" /><figcaption>How GitHub Copilot Works</figcaption></figure><p>As you write code, Copilot analyzes what you’re doing and can suggest entire lines or even complete functions. It learns from a wide range of publicly available code, which allows it to understand many programming languages and frameworks.</p><p>Overall, GitHub Copilot makes coding faster and easier, letting you focus more on solving problems and building your projects instead of worrying about syntax and repetitive tasks.</p><h4>Key Features of GitHub Copilot</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*IXgRw8Zab0u7e8DTcu7R6w.png" /><figcaption>Key Features of GitHub Copilot</figcaption></figure><ol><li><strong>Code Completion:</strong> GitHub Copilot suggests entire lines or blocks of code as you type, helping you write code more quickly and efficiently.</li><li><strong>Context Awareness:</strong> It understands the context of your code, providing relevant suggestions based on the current file and the overall project.</li><li><strong>Multi-Language Support:</strong> Copilot works with a wide variety of programming languages, including Python, JavaScript, TypeScript, Ruby, and more.</li><li><strong>Learning from Repositories:</strong> The tool has been trained on a range of public code repositories, allowing it to recognize different coding styles and patterns, which enhances its suggestions.</li></ol><p>GitHub Copilot increase the productivity, by automating routing coding tasks, it allow to more focus on more complex and creative aspects of development. Its is a leaning tool serves as a educational resource by exposing new libraries and functions. GitHub Copilot suggestions helps in doing rapid prototyping.</p><h4>How GitHub Copilot Supports for Automation Test</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*TJSe3Ew6B6YFsxPRV53aUw.png" /><figcaption>GitHub Copilot for Automation Test</figcaption></figure><ol><li><strong>Generate Automation Test Scripts:</strong> GitHub Copilot can help you create automation test scripts quickly, saving you time and effort in the coding process.</li><li><strong>Implement Page Object Model (POM):</strong> It can assist in applying the Page Object Model design pattern to your test scripts, promoting better organization and reusability.</li><li><strong>Generate Test Data:</strong> Copilot can also help you create test data for your scripts, ensuring you have the necessary inputs to thoroughly test your applications.</li><li><strong>Optimize Test Scripts:</strong> It offers suggestions to optimize your existing test scripts, making them more efficient and effective.</li><li><strong>Fix Errors in Scripts:</strong> If you encounter errors in your scripts, Copilot can suggest fixes, helping you resolve issues faster.</li><li><strong>Generate Documentation:</strong> The tool can help you create documentation for your scripts, making it easier for others (or yourself) to understand the code in the future.</li><li><strong>Explain Existing Scripts:</strong> Copilot can provide explanations for existing scripts or clarify errors in the output, making debugging and maintenance simpler.</li></ol><h3>Leverage Copilot to Implement the Playwright Script Practice Test Login Site</h3><h4>Test Case: Login to the Application</h4><p>For our first test case, we will focus on a simple login process for the application. Below are the test steps we will follow. GitHub Copilot will assist us in several ways:</p><ol><li><strong>Generate Test Script:</strong> Based on the test case description, Copilot can automatically generate the corresponding test script.</li><li><strong>Apply Page Object Model (POM):</strong> It will help us implement the Page Object Model design pattern, which promotes better organization and maintainability of our test code.</li><li><strong>Group Atomic Steps:</strong> Copilot can assist in grouping atomic steps into functions, making our test scripts cleaner and more efficient.</li></ol><p>With these features, we can streamline our testing process and enhance the overall quality of our automation efforts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fXcXb5Ihy7HUAtyzA1Xn5w.png" /><figcaption><a href="https://practicetestautomation.com/practice-test-login/">Practice Test Login</a> Site</figcaption></figure><blockquote><strong>Test case 1: Verify that user is able to login with valid credentials</strong></blockquote><p>Steps:</p><ol><li>Open page</li><li>Type username <strong>student</strong> into Username field</li><li>Type password <strong>Password123</strong> into Password field</li><li>Push <strong>Submit</strong> button</li><li>Verify new page URL contains <strong>practicetestautomation.com/logged-in-successfully/</strong></li><li>Verify new page contains expected text (‘Congratulations student. You successfully logged in!’)</li><li>Verify button <strong>Log out</strong> is displayed on the new page</li></ol><p>Let’s dive in!</p><ol><li>Generate a test script Using<strong> </strong>GitHub Copilot</li></ol><p>Create a login test within the tests package, and make sure to import the Playwright library. This will enable GitHub Copilot to recognize the library and assist in implementing the test case effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-S3MVoBDrKb1SJi6Lc7wCA.png" /><figcaption>login.spec.js test</figcaption></figure><p>Rather than writing the entire test script from scratch, we will provide the test case as a comment. This will allow the script to be generated automatically based on the comment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*330qoAn_FIrh9AFNd0F4uA.png" /><figcaption>Add the test case as a comment in the login.spec.js file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPkwNiv_vYzcutZIfoyNiA.png" /><figcaption>Automatically generated test script by GitHub Copilot, created based on the comment containing the test case</figcaption></figure><p>Above, you can see the suggested code, which was generated very quickly. Now, let’s run the code to see how it performs.</p><p>To execute the test, use the following command:</p><blockquote>npx playwright test login.spec.js — project chromium — headed</blockquote><p>However, the generated script contains some errors. For now, we can comment out those steps and run the rest of the script. We’ll need to manually update the syntax and locators for certain tests and steps.</p><p>Let’s go ahead and make those adjustments before running the test again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pCelKKfvX90qmCh5xgX63Q.png" /><figcaption>Manually adjust the syntax and locators for specific tests and steps</figcaption></figure><p>We can use inline comments to guide GitHub Copilot in generating the script for us. Once the script is generated automatically, we can run it to check for any errors. If there are issues, we can manually fix them, particularly updating the locators as needed.</p><p>The test script has now passed successfully!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J1aaUdG13K2YilRPK-Mb8g.png" /><figcaption>The test script has now successfully passed</figcaption></figure><p><strong>2. Apply Page Object Model (POM) Using GitHub Copilot</strong></p><p>Next, let’s implement the Page Object Model in the script to make it easier to maintain. Open the GitHub Copilot chat and type, ‘Create Page Object Model for this script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gZNurSHjX14YWCVns62RsQ.png" /><figcaption>Open the GitHub Copilot chat and type, ‘Create Page Object Model for this script</figcaption></figure><p>You’ll see that it generates the test steps in the GitHub Copilot chat, which we can then use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_xwsNP7se0tD8hYK5qtpTg.png" /><figcaption>It generates the test steps in the GitHub Copilot chat</figcaption></figure><p>Following the steps provided in the GitHub Copilot chat, we first need to create a LoginPage class and add the suggested code to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*MsVre1lMpXynYUMId5nvGA.png" /><figcaption>Steps suggested by GitHub Copilot for creating a LoginPage class</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9l0Le6uFMnwlhyBx5OflEQ.png" /><figcaption>Code suggested by GitHub Copilot for creating a LoginPage class</figcaption></figure><p>You can see that all the elements and methods related to the page are stored here. Now, let’s return to the test case [login.spec.js] and update it based on the LoginPage class.</p><p><strong>3. Group Atomic Steps Using GitHub Copilot</strong></p><p>We can enhance the script by combining related code into a function.</p><p>We can improve the script by combining related code into a function. In the GitHub Copilot chat, based on the login test I’m working on, we can type ‘Convert enterUsername, enterPassword, and clickSubmit into a function.’ You can change this command to fit your test as needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QSFWP9nmq4NJzzQ6UIZnlw.png" /><figcaption>Type “Convert enterUsername, enterPassword, and clickSubmit” into a function</figcaption></figure><p>It will then provide a suggestion based on your request to convert the code into a function, as shown below. We can use this suggested code to update the loginPage.js file and create the functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l4PFMFo3QE0inzUTPllVqA.png" /><figcaption>Code suggested by GitHub Copilot for grouping atomic steps</figcaption></figure><p>Now, the navigation to the site and the login process are separated into two distinct functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bt1GvvGuZQeflqbd6hJUQQ.png" /><figcaption>Two separate functions handle the navigation to the login page, entering the username and password, and clicking the submit button</figcaption></figure><p>Based on these functions, we can update the login.spec.js test. Alternatively, you can seek assistance from GitHub Copilot, and copy and paste the suggested code directly into your test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lzkvvhyNK42mtbs4huROzw.png" /><figcaption>The login.spec.js file has been updated with the new functions suggested by GitHub Copilot</figcaption></figure><p>The verified points should be associated with the home page, not the login page. To achieve this, we can ask GitHub Copilot for assistance. Simply chat with GitHub Copilot to get the necessary code. You’ll just need to create a homePage file inside your test folder.</p><p>With the help of GitHub Copilot, we’ve created separate functions to make the code clearer. Simply type in your request, such as “For the homepage, create separate functions to check the success message and the visibility of the logout button”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ra3PTOdu80SD3w1tv5gLQ.png" /><figcaption>Separate functions to verify the success message and check the visibility of the logout button</figcaption></figure><p>Based on that, you can seek assistance from GitHub Copilot to generate the login.spec.js file using the new methods created in the homePage.js file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Fm_n4OgXDpdb6LD-JQpfQ.png" /><figcaption>Request help from GitHub Copilot to generate the login.spec.js file utilizing the new methods created in the homePage.js file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E8LAsdA8tycnmxV7OPI6Rg.png" /><figcaption>Code suggested by GitHub Copilot has been replaced in the login.spec.js file</figcaption></figure><p>Thanks to the assistance from GitHub Copilot, everything has been completed quickly. Now, we will rerun the script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZ4TA_TnElt1wRMYIcKb5Q.png" /><figcaption>The test has passed successfully</figcaption></figure><p>The test is passing successfully.</p><p><strong>4. Generate Test Data File for the Data Used in the Test Case</strong></p><p>The test data is currently hard-coded. We can ask GitHub Copilot to generate this data in JSON format and update the existing script accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pnSGybN-mjSHJKHy_8nLsw.png" /><figcaption>GitHub Copilot can assist in generating hard-coded data in JSON format</figcaption></figure><p>We will now create a JSON file to store the test data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8hQILPcMTLF5NaDCjEfjQg.png" /><figcaption>GitHub Copilot has suggested a file named testData.json</figcaption></figure><p>Next, we can update the test script using the modifications suggested by GitHub Copilot, based on the JSON file created to store the test data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGfnBusjal9nWeIly-Ux8g.png" /><figcaption>GitHub Copilot has suggested modifications to update the login.spec.js file</figcaption></figure><p>We no longer see any hard-coded values. Let’s rerun the script. It is throwing this error due to incorrect syntax in the login.spec.js file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krY6Oh4-IuC0dsYyoyXUJg.png" /><figcaption>This error is occurring because of incorrect syntax in the login.spec.js file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wGIWHn5oTch-ICvY-RZNWA.png" /><figcaption>Just enter the error message in the GitHub Copilot chat, and it will suggest the updates or corrections needed to fix your script</figcaption></figure><p>After making the necessary corrections to the script, we reran the code, and the test has now passed. For script corrections, you can leverage GitHub Copilot’s support. Simply type the error message in the GitHub Copilot chat, and it will provide the necessary updates or corrections to help you fix your script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-c3RksfV0ID8d3W8uR1grg.png" /><figcaption>The test has successfully passed</figcaption></figure><p>While GitHub Copilot is a valuable tool, it cannot handle everything on its own. We still need human input to refine the generated scripts and ensure their accuracy. However, instead of manually typing out scripts or conducting extensive research to resolve scripting issues, GitHub Copilot can significantly reduce errors and streamline the implementation process.</p><p>I hope you find this article interesting and consider applying GitHub Copilot to your projects.</p><p>This concludes the article. Thank you for reading!</p><p>Stay tuned for the next article on Playwright, where we will explore additional functionalities of Playwright.</p><p>Until then, happy testing!</p><p>First article in this series : <a href="https://medium.com/chaya-thilakumara/playwright-101-an-introduction-3e6f995e65a0">Playwright 101: An Introduction</a></p><p>Second article in this series : <a href="https://medium.com/chaya-thilakumara/playwright-102-a-step-by-step-guide-to-write-a-login-test-dc579c86e299">Playwright 102: A Step-by-Step Guide to Write a Login Test</a></p><p>This is the third article in the series: <a href="https://medium.com/chaya-thilakumara/playwright-103-github-copilot-in-the-automation-testing-6ecc14e260e9">Playwright 103 — Using GitHub Copilot for Automation Testing</a></p><p>References :<br><a href="https://playwright.dev/java/docs/intro">https://playwright.dev/java/docs/intro</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ecc14e260e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/playwright-103-github-copilot-in-the-automation-testing-6ecc14e260e9">Playwright 103: GitHub Copilot in the Automation Testing</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playwright 102: A Step-by-Step Guide to Write a Login Test]]></title>
            <link>https://medium.com/chaya-thilakumara/playwright-102-a-step-by-step-guide-to-write-a-login-test-dc579c86e299?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/dc579c86e299</guid>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Mon, 23 Sep 2024 08:28:14 GMT</pubDate>
            <atom:updated>2024-09-22T17:47:58.899Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome back to my series on <a href="https://medium.com/chaya-thilakumara/playwright-101-an-introduction-3e6f995e65a0">Playwright</a>. In this article, I’ll explain you to write a login test using Playwright, providing a step-by-step guide along the way. You’ll also explore some of the key features of Playwright through practical examples.</p><p>Let’s get started!</p><h4>Overview</h4><ol><li>Navigating to a Specific URL in a Playwright Test</li><li>Pause the Execution of the Playwright Test</li><li>Running Playwright Tests in Headed Mode on Chromium</li><li>Inspecting Elements to Write Login Functionality</li><li>A Guide to Implementing Assertions</li></ol><ul><li><strong>Assertion 1</strong>: Check Specified Locator Appears Exactly Once on the Page</li><li><strong>Assertion 2</strong>: Checking Element Visibility: Hidden or Visible</li><li><strong>Assertion 3</strong>: Verifying Element Enablement or Disablement</li><li><strong>Assertion 4</strong>: Soft Assertion</li><li><strong>Assertion 5</strong>: Verifying the Text of an Element</li><li><strong>Assertion 6</strong>: Verifying Element Attributes</li><li><strong>Assertion 7</strong>: Verifying Page URL and Title</li><li><strong>Assertion 8</strong>: Visual Validation with a Screenshot</li></ul><h4>1. Navigating to a Specific URL in a Playwright Test</h4><p>To get started, let’s create a test in your project. First, create a new file and, at the top, import test and expect from Playwright. Next, define your test by giving it a title and creating an asynchronous function. Inside the function, you’ll receive the page parameter. Once you have your test block set up, you can begin writing your test code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*fkqO5-_q70unMkGv7ZGZXg.png" /><figcaption>Test File playwright-test.spec.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fCSCf-ffnH3-ZXfDao2Ehw.png" /><figcaption>Playwright’s native asynchronous capabilities allow for smoother handling of operations</figcaption></figure><p>In this guide, I’ll be using the <a href="https://practicetestautomation.com/practice-test-login/">Practice Test Login</a> site to walk you through the steps of creating a test. On this page, you’ll find fields for entering a username and password, along with a submit button for executing the login.</p><p>First, your test needs to navigate to the site at <a href="https://practicetestautomation.com/practice-test-login/">https://practicetestautomation.com/practice-test-login/</a> to access the login form. To achieve this, you’ll need to include code in your test to redirect to that URL.</p><p>To navigate to the <a href="https://practicetestautomation.com/practice-test-login/">Practice Test Login</a> page in your test, use the following line of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*YLktlnnCpzs-cFkatL3SOA.png" /><figcaption>Code to navigate to the <a href="https://practicetestautomation.com/practice-test-login/">Practice Test Login</a> site</figcaption></figure><blockquote><strong>This command will redirect your test to the specified URL, allowing you to interact with the login form.</strong></blockquote><blockquote>await page.goto(‘https://practicetestautomation.com/practice-test-login/&#39;);</blockquote><ul><li><strong>await</strong>: This keyword tells the code to wait for the promise returned by page.goto() to resolve.</li><li><strong>page.goto()</strong>: This function is used to navigate to the specified URL.</li><li><strong>&#39;https://practicetestautomation.com/practice-test-login/&#39;</strong>: This is the URL I want to visit.</li></ul><h4>2.Pause the Execution of the Playwright Test</h4><p>The line of code await page.pause(); is used to pause the execution of your Playwright script. You typically use this in a testing scenario where you want to manually check something before proceeding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*Xciw54V5ZCREO2DwLySCZg.png" /><figcaption>Code to pause the execution of the Playwright script</figcaption></figure><ul><li><strong>await</strong>: This keyword ensures that the script waits for the pause method to complete before continuing.</li><li><strong>page.pause()</strong>: This function pauses the execution of the script, allowing you to interact with the page in a debugging session. You can inspect elements, test interactions, and see the current state of the page.</li></ul><p>When you call page.pause(), it will open the Playwright Inspector, allowing you to interact with the page visually.</p><p>After you&#39;re done inspecting, you can resume the script execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*z0Lh2eW4dx1kYKZYFCShbA.png" /><figcaption>Playwright Inspector : Record, Copy, Resume, Step Over and Pause buttons</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*msWsOVFZeHI_WtlatncNOg.png" /><figcaption>Playwright Inspector window</figcaption></figure><h4>3. Running Playwright Tests in Headed Mode on Chromium</h4><p>Below command will help you to run you test in headed mode only on chromium browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*td5NzBfWSoOVXDFdKZxV-g.png" /><figcaption>Code to execute the test in headed mode on chromium browser</figcaption></figure><blockquote>npx playwright test playwright-test.spec.js — project chromium — headed</blockquote><ul><li><strong>npx</strong>: This command runs a package from the npm registry without needing to install it globally.</li><li><strong>playwright test</strong>: This part indicates that you are using Playwright to run tests.</li><li><strong>playwright-test.spec.js</strong>: This is the specific test file you want to execute.</li><li><strong>--project chromium</strong>: This option specifies that the test should run using the Chromium browser.</li><li><strong>--headed</strong>: This flag tells Playwright to run the browser in headed mode (with a visible UI), as opposed to headless mode (which runs without a UI).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*08xEF9hGxzePhfllT2UwQA.png" /><figcaption>Using PowerShell executed the test in headed mode on chromium browser</figcaption></figure><p>The command npx playwright show-report is used to display the test results and reports generated by Playwright. When you run this command, it opens the report in your default web browser, allowing you to review the outcomes of your tests, including details on passed and failed tests, screenshots, and other relevant information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HBLXjA5OdHRcDo6dHAJR_Q.png" /><figcaption>Using PowerShell generated the report</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ft3g1hC2CaM8TAeVyQjdGQ.png" /><figcaption>Generated report</figcaption></figure><h4>4. Inspecting Elements to Write Login Functionality</h4><p>To begin, right-click on the field or button you want to inspect on the site. You can access various properties of the object present in the DOM.</p><blockquote>The <strong>DOM</strong> (Document Object Model) is a structure that represents a webpage, allowing programming languages to access and manipulate its content and layout.</blockquote><p>For example, if you want to click on the username field on the <a href="https://practicetestautomation.com/practice-test-login/">Practice Test Login</a> page, right-click on that field. You’ll see different properties such as type, id, and name. You can use any of these properties to interact with the element in your code. For instance, you might write page.click(&#39;selector&#39;) using the appropriate property to perform the action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OmkYVf_9LfpIU5DaTej5lg.png" /><figcaption>Inspect the site to access various properties</figcaption></figure><p>Let’s say I want to use the “id” property. I would copy the value id=username, and then I would write the code to interact with that element.</p><p>You would use the following code to click on the element with the “id” property.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*hpbVBSO7lw9IdOI0IGs0hw.png" /><figcaption>Code to click username field from id property</figcaption></figure><blockquote>await page.click(‘id=username’);</blockquote><p>After clicking on the Username field, you’ll need to enter the username into that field. To do this, use the appropriate command to input the username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*kBlH3cygqC_EZk0E0pY_NQ.png" /><figcaption>Code to input username</figcaption></figure><blockquote><strong>This command will find the element with the ID “username” and fill it with the text “student.”</strong></blockquote><blockquote>await page.locator(‘id=username’).fill(‘student’);</blockquote><p>You can write similar code to click on the password field and enter the input. Just use the appropriate selector for the password field and fill it with the desired value.</p><blockquote><strong>This code first clicks on the password field, then fills it with the text “Password123.”</strong></blockquote><blockquote>await page.click(‘id=password’);<br>await page.locator(‘id=password’).fill(‘Password123’);</blockquote><p>To click the Submit button, use the CSS selector [#submit]. Right-click on the Submit button, inspect the element, and then right-click again to copy the selector. This will allow you to interact with the button in your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fkIa7MyepIvhfX88y0Nmvw.png" /><figcaption>Right-click on the Submit button to inspect the element, and then right-click again to copy the selector</figcaption></figure><blockquote><strong>This command will find the button with the ID “submit” and simulate a click on it.</strong></blockquote><blockquote>await page.locator(‘#submit’).click();</blockquote><p>You can also use XPath to locate the Submit button. To obtain the XPath, right-click on the Submit button, inspect the element, and then right-click again to copy the XPath. This will allow you to interact with the button using XPath in your code.</p><blockquote><strong>This command locates the button with the ID “submit” and simulates a click on it.</strong></blockquote><blockquote>await page.locator(‘//*[@id=”submit”]’).click();</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*la7wHJfxKAPvxGB5PDC8zA.png" /><figcaption>Code snippet for the login functionality we’ve implemented so far</figcaption></figure><p>This code uses the .only modifier in Playwright, allowing you to run a specific test exclusively, bypassing all other tests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*CuGoVQF1TSBBDOjWwYaPHg.png" /><figcaption>The .only modifier is used to run only a specific test, allowing you to focus on that particular test while skipping all others</figcaption></figure><ul><li><strong>test.only</strong>: This modifier tells Playwright to run only this particular test, ignoring all other tests in the file. It&#39;s useful for focusing on a single test while developing or debugging.</li><li><strong>&#39;First Playwright Test&#39;</strong>: This is the name of the test.</li><li><strong>async ({ page }) =&gt; { ... }</strong>: This is the asynchronous function that contains the test logic. The page object is provided by Playwright and represents a single tab in the browser.</li></ul><h4>5. A Guide to Implementing Assertions</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*WQRnzii2puAhVYfR47TL9Q.png" /><figcaption>Playwright Assertion Types</figcaption></figure><p>In Playwright, there are built-in assertions available, but you can also create custom assertions. Assertions in testing are checks or verifications performed during test execution to ensure that the application behaves as expected.</p><p>In Playwright, assertions are essential for confirming that your application functions as intended during testing. Playwright test uses the expect library to simplify the process of creating these assertions.</p><p>Now, let’s examine assertions for the <a href="https://practicetestautomation.com/practice-test-login/">Practice Test Login</a> page.</p><h4>Assertion 1: Check Specified Locator Appears Exactly Once on the Page</h4><p>This assertion checks if an element with the specified locator appears exactly once on the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*jFOZDneGEknGDmHF2AA9CA.png" /><figcaption>Code to checks whether an element with the specified locator appears exactly once on the page</figcaption></figure><blockquote>await expect(page.locator(‘#submit’)).toHaveCount(1);</blockquote><ul><li><strong>await</strong>: This keyword is used to pause the execution of the script until the assertion completes.</li><li><strong>expect()</strong>: This function is part of the Playwright Test framework and is used to create assertions.</li><li><strong>page.locator(&#39;#submit&#39;)</strong>: This method targets the element with the ID submit. The locator function allows you to interact with and make assertions about elements on the page.</li><li><strong>toHaveCount(1)</strong>: This assertion checks that the targeted element appears exactly once in the DOM. If the count is not equal to 1, the test will fail.</li></ul><p>The code snippet checks if an element with the ID submit exists on the page and, if it does, clicks that element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*BuLV73VxoVcRm3h7ey2FOQ.png" /><figcaption>Code snippet provided checks if an element exists on the page and, if it does, clicks that element</figcaption></figure><blockquote>if (await page.$(‘#submit’)){<br> await page.locator(‘#submit’).click();<br>}</blockquote><p><strong>1. await page.$(&#39;#submit&#39;)</strong>:</p><ul><li>This line uses the $ method to query for the element with the ID submit.</li><li>If the element exists, it returns a reference to the element; if it does not exist, it returns null.</li></ul><p><strong>2. if (...) { ... }</strong>:</p><ul><li>The if statement checks whether the element was found (i.e., not null).</li></ul><p><strong>3. await page.locator(&#39;#submit&#39;).click();</strong>:</p><ul><li>If the element is found, this line uses the locator method to click on the submit button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mX5oGt1QHznHcNu3yT05jg.png" /><figcaption>Code snippet checks if an element exists on the page and, if it does, clicks that element</figcaption></figure><h4>Assertion 2: Checking Element Visibility: Hidden or Visible</h4><p>This assertion in Playwright is used to verify the visibility state of an element.</p><blockquote><strong>This assertion checks whether the element with the ID </strong><strong>submit is currently visible on the page. If the element is not visible, the test will fail.</strong></blockquote><blockquote>await expect (page.locator(‘#submit’)).toBeVisible();</blockquote><blockquote><strong>This assertion checks whether the element with the ID </strong><strong>submit is hidden.If the element is visible when this assertion is evaluated, the test will fail.</strong></blockquote><blockquote>await expect (page.locator(‘#submit’)).toBeHidden();</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pd0zZcB3Lu4Nykv6mPetdg.png" /><figcaption>Code Snippet for Checking Element Visibility: Hidden or Visible</figcaption></figure><h4>Assertion 3: Verifying Element Enablement or Disablement</h4><p>This assertion in Playwright is used to verify whether an element is in an enabled or disabled state.</p><blockquote><strong>This assertion checks whether the element (typically a button) with the ID </strong><strong>submit is enabled and can be interacted with. If the element is disabled when this assertion is evaluated, the test will fail.</strong></blockquote><blockquote>await expect(page.locator(‘#submit’)).toBeEnabled();</blockquote><blockquote><strong>This assertion checks whether the element with the ID </strong><strong>submit is disabled and cannot be interacted with. If the element is enabled at the time this assertion is evaluated, the test will fail.</strong></blockquote><blockquote>await expect(page.locator(‘#submit’)).toBeDisabled();</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*LawQdl8eb86Uvx_5gC8EZw.png" /><figcaption>Code Snippet for Verifying Element Enablement or Disablement</figcaption></figure><p>Let’s run this and see the results. The test will fail because the submit button is not disabled on the site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cT-NhSW2qIE3udzmUrlX8A.png" /><figcaption>Login Functionality of <a href="https://practicetestautomation.com/practice-test-login/">Practice Test Login</a> page</figcaption></figure><p>In the failure report, you will find the error log stating: “Locator: locator(‘#submit’) Expected: disabled Received: enabled.” This indicates that the test expected the submit button to be disabled, but it was found to be enabled instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jV7g7xQLAvAlUIdGSM_ZVQ.png" /><figcaption>The error message indicates a mismatch: “Expected: disabled, Received: enabled</figcaption></figure><p>After the step to check if the element is enabled, the test has failed. If you want to continue running the test despite this failure, you can use a <strong>soft assertion</strong> to allow the test to proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4gtTaGG1Y8nwukU0mLNh3A.png" /><figcaption>After the step to check if the element is enabled, the test has failed</figcaption></figure><h4>Assertion 4: Soft Assertion</h4><p>To add a soft assertion, simply append .soft after the expect statement. This will allow the test to continue executing even if the assertion fails. Now, let’s run the test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8v70hQc_YXSnOQ-c_mOdA.png" /><figcaption>Test continued to the next step despite the failure in the previous step</figcaption></figure><p>In the failed test report above, you can see that, due to the soft assertion we applied, the test continued to the next step despite the failure in the previous step. This allowed the execution to proceed and complete the following steps.</p><h4>Assertion 5: Verifying the Text of an Element</h4><p>This assertion in Playwright is used to verify the text content of an element.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*yf8Ma_dp4SfpZ9TJ0CBzCA.png" /><figcaption>Check the text content of an element with the ID submit or not</figcaption></figure><blockquote><strong>This assertion checks whether the element with the ID </strong><strong>submit contains the text &#39;Submit&#39;.If the text is not present in the element when this assertion is evaluated, the test will fail.</strong></blockquote><blockquote>await expect(page.locator(‘#submit’)).toHaveText(‘Submit’);</blockquote><blockquote><strong>This assertion checks that the element with the ID </strong><strong>submit does not contain the text &#39;Submit&#39;.If the text is present when this assertion is evaluated, the test will fail.</strong></blockquote><blockquote>await expect(page.locator(‘#submit’)).not.toHaveText(‘Submit’);</blockquote><h4>Assertion 6: Verifying Element Attributes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*2guN4JtxVU-JI2WBWss5hw.png" /><figcaption>Code to verify element attribute</figcaption></figure><blockquote><strong>This assertion checks if an element with the ID </strong><strong>submit has a specific attribute value.</strong></blockquote><blockquote>await expect(page.locator(‘#submit’)).toHaveAttribute(‘class’,’btn’);</blockquote><ul><li><strong>await</strong>: This keyword is used to pause the execution until the assertion completes.</li><li><strong>expect()</strong>: This function is part of the Playwright Test framework and is used to create assertions.</li><li><strong>page.locator(&#39;#submit&#39;)</strong>: This method targets the element with the ID submit.</li><li><strong>toHaveAttribute(&#39;class&#39;, &#39;btn&#39;)</strong>: This assertion checks if the element has an attribute named class with the value btn.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zecs4aOX3DaJPOZgRDK4Mg.png" /><figcaption>Element has an attribute named class with the value btn</figcaption></figure><p>or you can write the assertion using .toHaveClass. The line of code you provided is an assertion in Playwright that checks if an element with the ID submit has a specific CSS class.</p><blockquote>await expect(page.locator(‘#submit’)).toHaveClass(‘btn’);</blockquote><ul><li><strong>await</strong>: This keyword pauses the execution until the assertion is complete.</li><li><strong>expect()</strong>: This function is used in Playwright for making assertions about the state of elements.</li><li><strong>page.locator(&#39;#submit&#39;)</strong>: This method selects the element with the ID submit.</li><li><strong>toHaveClass(&#39;btn&#39;)</strong>: This assertion checks if the selected element has the class btn.</li></ul><h4>Assertion 7: Verifying Page URL and Title</h4><p>This assertion in Playwright validate the current URL and title of the page.</p><blockquote><strong>This assertion verifies that the current URL of the page matches the specified URL. If the URL does not match, the test will fail.</strong></blockquote><blockquote>await expect(page).toHaveURL(‘https://practicetestautomation.com/practice-test-login/&#39;);</blockquote><blockquote><strong>This assertion checks that the title of the current page matches the expected title. If the title is different, the test will fail.</strong></blockquote><blockquote>await expect(page).toHaveTitle(‘Test Login | Practice Test Automation’);</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKHJMhjSQXff6bPwXcYgeQ.png" /><figcaption><strong>Code snippet assertion that verifies the current URL of the page</strong></figcaption></figure><h4>Assertion 8: Visual Validation with a Screenshot</h4><p>This assertion in Playwright verifies whether the current page matches a previously saved screenshot.</p><blockquote>await expect(page).toHaveScreenshot(‘screenshot.png’);</blockquote><ul><li><strong>await</strong>: This keyword is used to pause the execution until the assertion is complete.</li><li><strong>expect()</strong>: This function is part of the Playwright Test framework for making assertions about the state of elements or pages.</li><li><strong>page</strong>: This refers to the current page object that you are interacting with.</li><li><strong>toHaveScreenshot(&#39;screenshot.png&#39;)</strong>: This assertion checks whether the current page&#39;s screenshot matches the image file specified (in this case, screenshot.png).</li></ul><p>When you run this initially, you may encounter the following error:</p><blockquote>A snapshot doesn’t exist at C:\TestGitHubCopilot\tests\playwright-test.spec.js-snapshots\screenshot-chromium-win32.png, writing actual.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BacxZp9Wd6mUlZy0yahVog.png" /><figcaption>The error in PowerShell indicates that a snapshot does not exist</figcaption></figure><p>Initially, there won’t be a screenshot available for comparison. However, after you run the script and generate a screenshot, the test will pass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Osq5MO0k3RmCN-K102k0Q.png" /><figcaption>Expected and Actual Screenshots Side by Side</figcaption></figure><p>Below, you can see the code snippet that has been explained so far.</p><blockquote>const { test, expect } = require(‘@playwright/test’);</blockquote><blockquote>test(‘First PlayWright Test’, async ({page}) =&gt; {</blockquote><blockquote><strong>//Navigating to a ‘https://practicetestautomation.com/practice-test-login/&#39; site</strong><br> await page.goto (‘https://practicetestautomation.com/practice-test-login/&#39;);<br> <strong>//Pause the execution of the Playwright script</strong><br> await page.pause();</blockquote><blockquote><strong>//Click Username field</strong><br> await page.click(‘id=username’);<br> <strong>//Fill Username field</strong><br> await page.locator(‘id=username’).fill(‘student’);</blockquote><blockquote><strong>//Click Password field</strong><br> await page.click(‘id=password’);<br> <strong>//Fill Password field</strong><br> await page.locator(‘id=password’).fill(‘Password123’);</blockquote><blockquote><strong>//Assertion -Check specified locator appears exactly once on the page</strong><br> await expect(page.locator(‘#submit’)).toHaveCount(1);</blockquote><blockquote><strong>//Assertion -Check the element is visible</strong><br> await expect (page.locator(‘#submit’)).toBeVisible();</blockquote><blockquote><strong>//Assertion -Check the element is hidden<br> //Soft Assertion — If the assertion fails, the test will continue to run</strong><br> await expect.soft(page.locator(‘#submit’)).toBeHidden();</blockquote><blockquote><strong>//Assertion -Check the element is enabled</strong><br> await expect(page.locator(‘#submit’)).toBeEnabled();</blockquote><blockquote><strong>//Assertion -Check the element is disabled<br> //Soft Assertion — If the assertion fails, the test will continue to run</strong><br> await expect.soft(page.locator(‘#submit’)).toBeDisabled();</blockquote><blockquote><strong>//Assertion -Check the element text is equal to the expected text</strong><br> await expect(page.locator(‘#submit’)).toHaveText(‘Submit’);<br> <strong>//Assertion -Check the element text is not equal to the expected text<br> //Soft Assertion — If the assertion fails, the test will continue to run</strong><br> await expect.soft(page.locator(‘#submit’)).not.toHaveText(‘Submit’);</blockquote><blockquote><strong>//Assertion -Check the element attributes</strong><br> await expect(page.locator(‘#submit’)).toHaveAttribute(‘class’,’btn’);<br> await expect(page.locator(‘#submit’)).toHaveClass(‘btn’);</blockquote><blockquote><strong>//Assertion -Check the URL of the page</strong><br> await expect(page).toHaveURL(‘https://practicetestautomation.com/practice-test-login/’);</blockquote><blockquote><strong>//Assertion -Check the title of the page</strong><br> await expect(page).toHaveTitle(‘Test Login | Practice Test Automation’);</blockquote><blockquote><strong>//Assertion -Visual validation with a screenshot</strong><br> await expect(page).toHaveScreenshot(‘screenshot.png’);</blockquote><blockquote><strong>//Click Submit button</strong><br> await page.locator(‘#submit’).click();</blockquote><blockquote>});</blockquote><p>This concludes the article. Thank you for reading!</p><p>Stay tuned for the next article on Playwright, where we will explore additional functionalities of Playwright.</p><p>Until then, happy testing!</p><p>My initial article in this series : <a href="https://medium.com/chaya-thilakumara/playwright-101-an-introduction-3e6f995e65a0">Playwright 101: An Introduction</a></p><p>References :<br><a href="https://playwright.dev/java/docs/intro">https://playwright.dev/java/docs/intro</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*Dx8nmGGRZLmHGo0zwzoVDw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc579c86e299" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/playwright-102-a-step-by-step-guide-to-write-a-login-test-dc579c86e299">Playwright 102: A Step-by-Step Guide to Write a Login Test</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playwright 101: An Introduction]]></title>
            <link>https://medium.com/chaya-thilakumara/playwright-101-an-introduction-3e6f995e65a0?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/3e6f995e65a0</guid>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Sat, 21 Sep 2024 09:59:17 GMT</pubDate>
            <atom:updated>2024-09-21T10:17:38.037Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*O13sh8oblFMCj2kV8_XDhQ.png" /></figure><p>This article serves as a comprehensive introduction to Playwright, equipping you with everything you need to get started. It covers the installation process, guides you through running your first test, and teaches you how to write a basic test, record a session, and execute your tests effectively. This piece is part of an ongoing series designed to enhance your understanding of Playwright and its capabilities.</p><h3>Overview</h3><ol><li>What is Playwright</li><li>Getting Started with Playwright</li><li>How to Run a Playwright Test</li><li>Creating Your First Playwright Test</li><li>Recording Tests with the Codegen Tool in Playwright</li><li>Viewing Executed Tests in the Trace Viewer in Playwright</li></ol><h3>1. What is Playwright</h3><ol><li><strong>Free &amp; Open-source Framework</strong>: Playwright is a free and open-source framework for web automation testing, developed by Microsoft</li><li><strong>Applications</strong>: It supports web applications, mobile applications, and APIs</li><li><strong>Languages</strong>: It is compatible with Java, Python, and .NET (C#) etc.</li><li><strong>Browsers</strong>: Playwright supports all modern engines Chromium, WebKit and Firefox and can use these browsers in both headless and headed modes</li></ol><blockquote><strong>Chromium</strong> is an open-source software project that forms the basis for many popular browsers, including Chrome, Opera, and Microsoft Edge</blockquote><blockquote><strong>WebKit</strong> is a browser engine primarily used in Apple’s Safari web browser, as well as all web browsers on iOS and iPadOS</blockquote><ul><li><strong>Headless Mode</strong>: Runs tests in the background without a visible browser window. Default mode.</li><li><strong>Headed Mode</strong>: Runs tests with a visible browser window for real-time observation.</li></ul><p><strong>5. Operating Systems</strong>: It is compatible with MacOS, Linux, and Windows</p><p><strong>6. Continuous Integration</strong>: It supports continuous integration (CI) environments</p><p><a href="https://playwright.dev/java/"><strong>Official Playwright Website</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*nGnOQoHu9s5kzAXXUOE-OA.png" /><figcaption>Features of Playwright</figcaption></figure><h3>2. Getting Started with Playwright</h3><p>First, ensure that npm is installed on your machine. If it is not, you will need to install it. Once npm is installed, proceed to install Playwright. Follow the steps below, starting with the installation of npm:</p><ol><li><strong>Open the command prompt and type:</strong></li></ol><blockquote><strong>npm -v</strong> or <strong>npm — version</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*OBUnOCiSnl1Mkde3zaejag.png" /><figcaption>Command to check npm version</figcaption></figure><p>This command will display the version of npm installed on your machine. If you don’t see a version number, it means npm is not set up on your machine. In that case, you can download and install npm from the <a href="https://nodejs.org/en/download/package-manager">official website</a>.</p><p>2. <strong>Install Playwright using your IDE:</strong></p><p>You can choose any IDE that you prefer; for instance, I used IntelliJ IDEA, but you can also use Visual Studio Code if you like. After installing npm, create a new project in your chosen IDE. Navigate to the project’s directory and open PowerShell to install Playwright. You can do this by opening PowerShell in the location where your new project is located.</p><p>Open PowerShell and enter the following command</p><blockquote>npm init playwright@latest</blockquote><p>This will install the latest version of Playwright.</p><p>Once you install Playwright in your IDE, you will see the following files in the project you created:</p><ol><li><strong>package.json</strong> : node project management file</li><li><strong>playwright.config.js</strong> : configuration file</li><li><strong>tests</strong> folder : basic example test provided by Playwright</li><li><strong>tests-example</strong> folder : detailed example tests provided by Playwright</li><li><strong>gitignore </strong>: used in git commit and push our project to git repository</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*6Yb_yjR1Pe3Jl2D39HF5-Q.png" /><figcaption>Project Structure After Installing Playwright</figcaption></figure><p>You can also verify the Playwright version by running the following command:</p><blockquote>npm playwright -v</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*ceRszoQxQCIp_xbFB2cGDQ.png" /><figcaption>Command to Check Playwright Version</figcaption></figure><h3>3. How to Run a Playwright Test</h3><p>To run all the tests in the tests folder of your project across all browsers in headless mode, enter the following command in PowerShell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xbS49JEWE7gKyufL3PUPqA.png" /><figcaption>Tests in the Tests Folder</figcaption></figure><blockquote>npx playwright test</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*-BBUycNbbUes9iqRyIWIlw.png" /><figcaption>Command to Execute All the Tests in the Tests Folder</figcaption></figure><p>To view the generated report, you can either enter the following command in PowerShell or open the index.html file located in the project&#39;s report directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*-3XtKM0r_ajGtwux3qGV8Q.png" /><figcaption>index.html File</figcaption></figure><blockquote>npx playwright show-report</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d8AT7Px1K6jYVADurS8Mrw.png" /><figcaption>Playwright Test Execution Report</figcaption></figure><p>In the report, you can filter the results by test status — such as passed, failed, flaky, or skipped. By viewing each test individually, you can access detailed information, including the execution time and the browser in which the test ran.</p><p>The command npx playwright test example.spec.js runs the specific test file named example.spec.js.</p><blockquote>npx playwright test example.spec.js</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SY8AJFKSCAm4j9XZvwIdtQ.png" /><figcaption>Command to Run a Specific Test File in Playwright</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Obe4DKXnyefUfmMwq4jnBg.png" /><figcaption>Test File example.spec.js</figcaption></figure><p>The command npx playwright test --project=chromium runs tests specifically using the Chromium browser.</p><blockquote>npx playwright test — project=chromium</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*E3Z05aDgdsv6qT7CRlBLSA.png" /><figcaption>Command to Execute Tests Using Chromium Browser</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KaivlEfMhetk4OwSVJXD7Q.png" /><figcaption>Playwright Test Execution Report: Executed Only in Chromium Browser</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AZpLhlBAwI_b-kuip6Xemw.png" /><figcaption>Playwright Test Execution Report: Executed Only in Chromium Browser</figcaption></figure><p>The command npx playwright test --headed runs tests in headed mode, meaning the browser will be visible during the test execution.</p><blockquote>npx playwright test — headed</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*js24kYCgCv3Lf63sTNJR_Q.png" /><figcaption>Command to Run Tests in Headed Mode</figcaption></figure><h3>4. Creating Your First Playwright Test</h3><ol><li><strong>Create your first Playwright test in the ‘tests’ folder.</strong> Name the file with a “.spec.js” extension, adhering to the naming conventions used in the example tests within that folder.</li></ol><blockquote>testname.spec.js</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*t6eqGhnNuIrs9x2cqH4sjA.png" /><figcaption>A new Playwright test is created, following the format: first, the test name [playwright-test], and then the extension .spec.js</figcaption></figure><p>2. Next, we need to <strong>enable Playwright mode for the test</strong>. To do this, add the line require to include any modules located in external or separate files.</p><blockquote>const { test, expect } = require(‘@playwright/test’);</blockquote><p>This will include the Playwright test module and all its scripts within the “Playwright-test.spec.js” file. You can then use any of the scripts or modules available in the Playwright test package.</p><blockquote>The test function is used to create the tests, while the expect function is used to run assertions.</blockquote><blockquote>The require() function is a built-in Node.js method used to load modules from separate files. In this case, we are loading the test and expect modules from the Playwright package.</blockquote><p>3. Below is the code to <strong>create a test block in Playwright</strong></p><blockquote>test(‘First PlayWrightTest’, () =＞ {})</blockquote><blockquote>This format follows the structure: test(title of the test, testFunction)</blockquote><p>4. Inside the curly brackets, you can begin <strong>writing the steps for your test</strong></p><blockquote>const { test, expect } = require(‘<a href="http://twitter.com/playwright/test">@playwright/test</a>’);</blockquote><blockquote>test(‘First Playwright Test’, async ({ page }) =&gt; {<br> await page.goto(‘<a href="https://playwright.dev/&#39;">https://playwright.dev/&#39;</a>);<br> await expect(page).toHaveTitle(/Playwright/);<br>});</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yf5cvxYrdGqt3TneOQxlPg.png" /><figcaption>First Playwright Test</figcaption></figure><p>This code imports the test and expect functions from the Playwright package and defines a test named &quot;First Playwright Test.&quot; It navigates to the Playwright website and asserts that the page title contains &quot;Playwright.&quot;</p><p>The async keyword makes the function return a promise, while the await keyword pauses the function&#39;s execution until a promise is resolved</p><h3>5. Recording Tests with the Codegen Tool in Playwright</h3><p>Playwright includes a built-in tool called “Codegen,” also known as the test generator tool, which allows us to record our tests.</p><p>When you start Codegen, it opens two windows:</p><ol><li>The first is a <strong>Browser Window </strong>where you can navigate to your web application and interact with it.</li><li>The second window is the <strong>Playwright Inspector</strong>, which appears when you debug your code. In the Inspector, you can view the recorded scripts and control the recording by starting or stopping it as needed.</li></ol><blockquote>First, we will execute the “Codegen” command using the following command in the terminal:<br>npx playwright codegen</blockquote><p>By default browser window will open from chromium browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OUFF2pF4hY-P78ac7T5Z9A.png" /><figcaption>Browser Window : You can navigate to your web application and interact with it</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x9HChOUl6ePwgc3Yw0Fxdw.png" /><figcaption>Playwright Inspector Window : You can view the recorded scripts and control the recording by starting or stopping it as needed</figcaption></figure><p>In the browser window, you can navigate to any website. As you move your cursor over the elements on the page, you’ll notice that the corresponding objects are highlighted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1cDxquJIo_rGlNc--lVkIw.png" /><figcaption>The highlighted objects in the browser window, along with the Playwright Inspector, record the actions you take in the browser</figcaption></figure><p>In the Inspector window, you’ll find a record button. Once you select elements from the website and click this button, recording will begin automatically. The actions you take will be captured as scripts in the Inspector window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jWtQm9V3cSXR2aI9_eqZVw.png" /><figcaption>The Browser Window and Playwright Inspector work together to record the actions you perform in the Browser Window</figcaption></figure><p>In the Inspector window, you’ll find additional options, including a copy button to duplicate the script, as well as resume, stop, and step-over buttons. The resume, pause, and step-over buttons are particularly useful for debugging your script. Additionally, you can download the script in any of the languages listed in the dropdown menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tP-w5abAwLt9FqfEoOvRYQ.png" /><figcaption>You can download the script in any language available in the dropdown menu</figcaption></figure><p>You can manually copy the recorded script or use the copy button in the Inspector window. Then, simply return to your IDE and paste the script into your test file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f58p7ySTC_aDfJzWhtnRXw.png" /><figcaption>Playwright Inspector Window</figcaption></figure><p>You can run the test file in either headed or headless mode using the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*_Utcurw379AYB1jg2VPp0w.png" /><figcaption>Command to execute the file in headed mode</figcaption></figure><p>Additionally, you can enter the Codegen command along with the website you want to open. This will launch the desired website in the Playwright Inspector.</p><blockquote>npx playwright codegen [desired web site]</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*NiSpOKsneqVZltTMWRkfpw.png" /><figcaption>Launch the Google website in the Playwright Inspector</figcaption></figure><p>You can see all the options available in Codegen by executing the following command:</p><blockquote>npx playwright codegen — help</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*D3XBZU8u3gKJ9y0EZNukbA.png" /><figcaption>Command to view all available options in Codegen</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6r8GlcF2hfhti2l8BWsZ4A.png" /><figcaption>View all options in Codegen</figcaption></figure><p>To record on a specific browser (default is Chromium), use the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*SkbSs9JrOebU8SqamNJnbw.png" /><figcaption>Command to record using Codegen in Playwright on Firefox</figcaption></figure><p>To record and save the output to a file, use this command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*u8-yTNVGInCLoIF3terVNQ.png" /><figcaption>Command to record and save the output to a file named “record_example.js” in JavaScript</figcaption></figure><h3>6. View Executed Tests in the Trace Viewer in Playwright</h3><p>The <a href="https://playwright.dev/java/docs/trace-viewer-intro">Trace Viewer</a> is a graphical user interface tool that allows you to view executed tests along with snapshots, timelines, and other detailed traces.</p><p>To configure it, open the playwright.config.js file and set the appropriate options.</p><blockquote>trace: ‘on-first-retry’</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vvae5AhhR_-svgL-0QFekg.png" /><figcaption>Trace configuration on playwright.config.js file</figcaption></figure><p>Trace is enabled on the first retry, meaning that whenever a test is retried, tracing will be activated to capture the details of that test. Additionally, you must set the retry count to at least one in the playwright.config.js file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*r7Rydod9OgifywJpFoz0Hg.png" /><figcaption>Trace is set to only for the first retry in the playwright.config.js file</figcaption></figure><blockquote>retries: 1 means that a trace will be collected only when retrying a failed test for the first time.</blockquote><p>When a test fails, you can access the failed test in the report by clicking on it and then navigating to the “<strong>Retry#1</strong>” tab. In the Traces section, you’ll find the trace file. You can either click on the trace to open the Trace Viewer GUI tool and review the results, or download the trace as a zip file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVUrC8xnYIf5pXd9QTZwUQ.png" /><figcaption>Failed test in the “Retry#1” tab</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uuXgh2MDFKUgymZrgDZiUw.png" /><figcaption>“trace” link to download the trace as a zip file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DUpJnktPPB3nrT8humzMxg.png" /><figcaption>Trace GUI Tool</figcaption></figure><p>At the top, you’ll find the timeline, while the steps are displayed in the bottom left-hand corner. You can also view metadata, including start time, end time, duration, environment, browser, platform, and screen size. In the actions section, each step is listed, and you can click on a step to view its corresponding screenshot. This includes the screenshot related to the action, as well as screenshots taken before and after the action.</p><p>In the bottom, you can view call details, duration parameters, logs, console output, and the network tab. In the source tab, you can see the exact code of the test, with the specific step that was executed highlighted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E0oG0BgEXYLkhIt6LK_JJA.png" /><figcaption>Trace GUI Tool : Metadata</figcaption></figure><p>The Trace Viewer simplifies troubleshooting in Playwright.</p><p>While there’s much more to learn about Playwright, you now have a basic understanding of how it works. Thank you for reading, and stay tuned for the second part.</p><p>Until then, happy testing!</p><p>References :<br><a href="https://playwright.dev/java/docs/intro">https://playwright.dev/java/docs/intro</a></p><p><a href="https://www.youtube.com/@RaghavPal">https://www.youtube.com/@RaghavPal</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*Dx8nmGGRZLmHGo0zwzoVDw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e6f995e65a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/playwright-101-an-introduction-3e6f995e65a0">Playwright 101: An Introduction</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing Personal Effectiveness -Part 02]]></title>
            <link>https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-02-96c28600b83c?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/96c28600b83c</guid>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Thu, 20 Oct 2022 10:14:42 GMT</pubDate>
            <atom:updated>2022-10-22T10:13:43.586Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Stephen Covey’s t</strong>he 7 habits of highly effective people</h3><p>This is the extended article of my previous article “<a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d"><strong>Developing Personal Effectiveness -Part 01</strong></a>”. My <a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d">previous article</a> provides an introduction to this article.</p><p>Quick Summary of My <a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d">previous article</a>: “<a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d"><strong>Developing Personal Effectiveness -Part 01</strong></a>”:</p><blockquote>1. What does personal effectiveness mean?</blockquote><blockquote>2. What exactly is a habit?</blockquote><blockquote>3. What are the 3 things that need to be there to form a habit?</blockquote><blockquote>4. How exactly is a habit formed?</blockquote><blockquote>5. The 7 habits of highly effective people</blockquote><blockquote>6. The benefits of using these 7 Habits etc.</blockquote><p>So go check out my <a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d">previous article</a>: “<a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d"><strong>Developing Personal Effectiveness -Part 01</strong></a>” before reading this article.</p><p>The article <strong>“Developing Personal Effectiveness -Part 02”</strong> discusses <strong>Stephen Covey’s</strong> 7 habits of highly effective people in a detailed manner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*Kv--igfn5BVuuoZwvju3UQ.png" /><figcaption>Stephen Covey and his book: The 7 habits of highly effective people</figcaption></figure><p>Let&#39;s go through this article to see more details about the 7 habits of highly effective people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Cc4VTX0BlWUVynEJNsQjA.png" /><figcaption>The 7 habits of highly effective people</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xt5100vbgOuiItLMXTvPqQ.png" /></figure><p><strong>What exactly do we mean by proactive?</strong></p><blockquote>Being proactive means, you need to be responsible for your life choices.</blockquote><p>Well, there are two types of people:</p><ol><li><strong>Reactive people</strong></li><li><strong>Proactive people</strong></li></ol><ul><li><strong>Reactive people</strong> are always blaming everything beyond their control. They always stay in a state of self-denial and they never accept the way things are.</li><li><strong>Proactive people</strong> on the other hand take responsibility for their actions. These are the people who always use positive language as I can, I will and I will do it. However reactive people use languages like I can’t, I won’t be able to. If you are a proactive person you will always be less critical and more appreciative of people.</li></ul><p><strong>How to be proactive?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7DC-KKEpNOR7nm5-omnMug.png" /><figcaption>Circle of concern &amp; Circle of influence</figcaption></figure><p>Here you can see two circles,</p><ol><li><strong>Circle of concern</strong>: which is the outer circle</li><li><strong>Circle of influence</strong>: which is the inner circle</li></ol><blockquote><strong><em>Proactive people</em></strong> always spend more time in the <strong>circle of influence</strong>, the inner circle. The<strong> circle of influence</strong> is things you can influence, things that are under control <strong>(Internal Influences</strong>). For example mood, health, decisions, work-life balance, family, etc.</blockquote><blockquote>The things which are beyond your control lie in the <strong>circle of concern (External Influences)</strong>. As an example other people, climate, government, economy, etc. <strong><em>People who are reactive</em></strong> try to focus more on the <strong>circle of concern</strong> and they are wasting their time &amp; energy on that circle.</blockquote><p>Focus on the things that you can change or influence rather than things that you have no control over.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_qIGRUpfo04ZlwtFJ_41g.png" /></figure><p>Moving into our new habit, the 2nd habit “<strong>Begins with the end in mind</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cGeQ3lHv2aJaj-P3bjsJLQ.png" /><figcaption>Mission &amp; vision for life</figcaption></figure><p>Well, what we are really trying to say is that everything gets created twice.</p><ol><li><strong>First in our minds</strong></li><li><strong>Second in a physical state</strong></li></ol><blockquote>Secondly, it&#39;s important to understand that we need to have a direction in life. If we don’t have a direction in life we do not really know where we are going.</blockquote><p>So it&#39;s important to know the final destination and have the map of your destination in hand. It&#39;s very essential to have a mission and vision for your life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qGv8DEFcVpNA1YFWN3M1HA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_CFPlgYIMVTmcXGNUHqpg.png" /><figcaption>Urgent Vs Important chart &amp; 6 ways that help you to achieve time management</figcaption></figure><p>This is closely related to time management. <strong>Time management</strong> tells us we need to have a schedule and we need to have priorities in life. It is essential to have discipline &amp; management of your life as per the direction you want to take.</p><p>This habit differentiates from urgent and important aspects of our life. It is important because it helps us to avoid panic situations. We don&#39;t want to be in a state of rush all the time.</p><blockquote>So focus on the important rather than urgent things in life. The key is not to prioritize your schedule but to schedule your priorities.</blockquote><p>There are <strong>6 ways that help you to achieve this time management</strong> or putting first things first.</p><blockquote><strong>1. Connect to a Mission</strong></blockquote><blockquote><strong>2. Review Roles</strong></blockquote><blockquote><strong>3. Identify Goals</strong></blockquote><blockquote><strong>4. Organize weekly</strong></blockquote><blockquote><strong>5. Exercise Integrity</strong></blockquote><blockquote><strong>6. Evaluate</strong></blockquote><p>It’s important to <strong>connect to a mission</strong>. You need to know where you are going and connect your life to that.</p><p>Secondly, <strong>review roles</strong>, we all play a lot of roles in our life as students, a parent, employees, and bosses. whichever role in your life you may be, it&#39;s important to understand these are the roles of your life and you need to satisfy each and every role in your life in a good manner and a proper manner.</p><p>Thirdly it&#39;s important to <strong>identify the goals</strong> which are closely linked to the mission of your life.</p><p><strong>Organized weekly</strong>, as much as you can. Try and have a weekly schedule for yourself.</p><p><strong>Exercise integrity</strong> and <strong>evaluate</strong> your choices and life every month or every quarter, so that you know where you are going and whether it is the correct way to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKuflMmoAi_6TDEUmq4N5g.png" /></figure><p>Getting into habit no 4 “<strong>Think win-win</strong>”.</p><p>This is a very important habit because it helps you to understand there is enough for everybody in the world. Thinking win-win means having an attitude that everything is therefore everybody.</p><p>It&#39;s important to have competition but to have healthy competition. Don’t try to put others down by winning over them. Win-win is a commitment that allows everyone to win. Well, we are going to discuss 3 more strategies around win-win.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*__oXVrkZtOpBr5-pSoERXQ.png" /><figcaption>Win-Win paradigm</figcaption></figure><blockquote><strong>1. I Lose — You Win</strong></blockquote><blockquote><strong>2. I Win — You Lose</strong></blockquote><blockquote><strong>3. I Lose –You Lose</strong></blockquote><p>So the first one is “<strong>I Lose- You Win</strong>”. If you allow others to win over you, you will end up treating you badly and that is not a good strategy.</p><p>So secondly “<strong>I Win &amp; You Lose</strong>” here you always try to win and make sure you make others lose. Again is not a good strategy.</p><p>The third is “<strong>I Lose You Lose</strong>”. Again is not a good attitude to gain.</p><p>Win-win is a situation that allows you to win and as well as the opposite person to win. Win-win is a situation that will help you to have mutual relationships and mutual human interactions and that will really help you to be successful in life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfHjrS76_KUcb7bjDqqPLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rciaP2B7C1quvygg9dImg.png" /><figcaption>First to understand and then be understood</figcaption></figure><blockquote>How many times has it happened that you complete other people&#39;s sentences for them? We don’t really listen to them.</blockquote><p>It’s important to have empathetic listening and try and listen to others. Try and put yourself into their shoes and understand things from their perspective.</p><p><strong>It&#39;s important that you listen first to understand and then you will be better understood.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DuDRB3uaHkgqFPijTzF05w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nkLrtPFRcghuBoqAsAB1YA.png" /><figcaption>Synergize</figcaption></figure><p>Well getting into our next habit, habit number 6 is “<strong>Synergize”</strong>.</p><p><strong>Synergizing is all about teamwork, and communication with each other.</strong></p><p>When working we working in an organization we are meeting people with different thoughts and opinions. So it&#39;s important to value each one. Don’t ever think that your point of view is higher than other people. They are right in their own ways.</p><p>It&#39;s important to accept the differences with an open mind and accept them the way they are. Working together takes time but also it produces long-term relationships and results. People bring all their personal experiences and expertise to the table. So it&#39;s important to listen to everyone and it&#39;s important to be a good team member.</p><p><strong>Differences should be seen as a strength and not as weaknesses.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQRXu69V_zxi4qXDNL2BVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*spUU5faXI40GGISE25jZpQ.png" /><figcaption>Sharpen the saw</figcaption></figure><p>Getting into our last habit, habit number 7 means “<strong>Sharpen the saw</strong>”.</p><p>When you have understood all these 6 habits the 7th habit is the master of all the habits.<strong> It means that you need continuously improve yourself.</strong> Here we are talking about renewal in <strong>4 aspects or dimensions</strong> of life. It&#39;s important that this habit keeps you fresh as long as you keep practicing other habits.</p><p>It’s also important that if we don’t work on ourselves, our minds become robotic and we lose the passion to live. So it is important to keep upgrading our skill sets if we really want to be successful in life.</p><p><strong>How do we upgrade our skill sets with the help of 4 dimensions?</strong></p><p>Let’s quickly check these 4 dimensions :</p><ul><li><strong>Physical:</strong> It’s important to have good energy, good stamina also exercise because a healthy mind is a healthy body. So learn to renew yourself physically.</li><li><strong>Social/Emotional: </strong>Connect with people and try as much as you can for the community.</li><li><strong>Spiritual: </strong>Try and do a lot of self-study and meditation which will help you to overcome problems and have a balance work life.</li><li><strong>Mental: </strong>Try and do much as reading as you can visualization, planning &amp; writing.</li></ul><blockquote>Next, I would like to leave you with this personal development plan.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*StWhPNB6Ho6KUG9xoRzdZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*mmuWbOxLkFcA7DfpV9zxXQ.png" /><figcaption>Personal development plan</figcaption></figure><p>On one side you can see development <strong>objectives, </strong>so you can write down which area of your life you like to develop yourself into.</p><p><strong>Prioritize </strong>yourself based on the objective you entered. Whether it is low priority, medium, or high priority for you.</p><p>Under <strong>activities to be undertaken, </strong>write down the<strong> </strong>activities you need to do to follow those objectives to get fulfilled.</p><p>Also, you have to add a <strong>target date for achieving the objectives</strong>. Because if you don’t guide yourself or timeline yourself you never are able to achieve something. Enter the <strong>actual date of achievement</strong> and lastly <strong>review date</strong>, when have you actually reviewed yourself.</p><blockquote>To conclude this article : Personal effectiveness by saving that it is important to know that you need to win, if you want to win you have to change yourself. Don’t expect something to change when you don’t change internally.</blockquote><p>Thank you so much for reading this article.</p><p>Let’s meet with another exciting article.</p><p>See you soon !!!! Bye !!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96c28600b83c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-02-96c28600b83c">Developing Personal Effectiveness -Part 02</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing Personal Effectiveness -Part 01]]></title>
            <link>https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/1a0314a8e95d</guid>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Wed, 19 Oct 2022 07:41:22 GMT</pubDate>
            <atom:updated>2022-10-22T09:55:25.654Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>What does personal effectiveness mean?</strong></h4><p>In short, personal effectiveness means getting the best out of yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7bvrgLwomCBDKZci5doIIw.png" /><figcaption>Personal Effectiveness</figcaption></figure><p>Individuals with good personal effectiveness tend to constantly strive to achieve more advance their careers &amp; grow in both a personal and professional sense.</p><h4><strong>What exactly is a habit?</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NL6IiJvpDTCSQ8GVufCJRA.png" /><figcaption>What is a habit?</figcaption></figure><p>Habits and effectiveness are very closely linked together. Habit is something that we do over and over again. Repeatedly doing something makes it a habit.</p><h4><strong>What are the 3 things that need to be there to form a habit?</strong></h4><blockquote><strong>Skills:</strong> Learning how to do this</blockquote><blockquote><strong>Desire:</strong> A need or want</blockquote><blockquote><strong>Knowledge:</strong> What and why?</blockquote><p>When these 3 things are there habit is formed. If any of these 3 things are missing a habit will not be formed.</p><h4>How exactly is a habit formed?</h4><blockquote>Were we born with these habits? not exactly.</blockquote><p>We didn&#39;t really work consciously for getting habits to be formed they happened gradually over a period of time. Ultimately they become ingrained in our minds. Brain links specific behaviors with rewards. The more urgent the reward is, the better the strong the link is, and repeating the reward will reinforce the habit.</p><p>I would really want you to go and start forming some great habits which we will discuss under this topic.</p><p>We are now getting introduced to the 7 habits of highly effective people.</p><h4>The 7 habits of highly effective people</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sVRk6I4gJjfEQ_xwRkjI1w.png" /><figcaption>The 7 habits of highly effective people</figcaption></figure><p>These are the 7 habits and I will discuss all these habits in a lot of detail in my <a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-02-96c28600b83c">next article</a></p><h4>The benefits of using these 7 habits are :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XYUIgjxFFGDBDS5aoddL6Q.png" /><figcaption>The benefits of using these 7 habits</figcaption></figure><h4>The 7 habits move through these 3 different stages :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PafKiIRmRFQlPu4s_-Q0Zg.png" /><figcaption>The 7 habits move through these 3 different stages</figcaption></figure><p>Well, let&#39;s understand a little better.</p><ul><li><strong>Habit number1,2 and 3 helps us to focus on private victory. </strong>Once we are able to do that we move from a state of <em>Dependence </em>to a state of <em>Independence</em>.</li><li><strong>Habit number 4,5 and 6 helps us to have team player skills better communication skills and collaboration skills. </strong>Through these 3 habits, we move from <em>Independence </em>state to <em>Interdependence</em>.</li><li><strong>The last habit which is the 7th habit helps us to have the epitome of success.</strong></li></ul><p>I will discuss these 7 habits of highly effective people in my <a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-02-96c28600b83c">next article</a>. Let’s meet with another exciting article.</p><p>See you soon !!!! Bye !!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a0314a8e95d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/developing-personal-effectiveness-part-01-1a0314a8e95d">Developing Personal Effectiveness -Part 01</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Introduction to Git for Beginners]]></title>
            <link>https://medium.com/chaya-thilakumara/an-introduction-to-git-for-beginners-c97e701cecf9?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/c97e701cecf9</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github-pages]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[github-actions]]></category>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Mon, 15 Mar 2021 06:45:17 GMT</pubDate>
            <atom:updated>2021-03-15T06:45:17.248Z</atom:updated>
            <content:encoded><![CDATA[<p>There are so many tutorials with git commands which anyone can copy &amp; paste, but they really don’t explain how git works, how can you use git commands, and what git can do for you.</p><p>But this tutorial will help you to understand the git &amp; basic commands you’ll use frequently.</p><h4>Git and GitHub are <strong><em>not </em></strong>the same...</h4><blockquote><strong>Git</strong> is the most commonly used <strong>version control system (VCS)</strong>. Git tracks the changes you made to the files, so you have a record of what changes you made, and you can revert to specific versions whenever you need it.</blockquote><blockquote><a href="https://github.com/"><strong>GitHub</strong></a> is a website that manages projects that use git. You do not need GitHub to use git, but you cannot use GitHub without using git. There are many other alternatives to GitHub, such as GitLab, BitBucket etc.</blockquote><p>Git is software that works locally, your files and the revision history are stored on your computer. You can also use Github online hosts to store a copy of the files and their revision history.</p><p>Git also makes collaboration easier with multiple people, where you can upload your changes and download changes from others from a centrally located place.</p><p><strong>This article mainly focuses on the basic SHELL commands &amp; GitHub as the hosting service for Git.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*R3p5JC2C9iOVLZWs.png" /><figcaption>Basic GIT Workflow</figcaption></figure><p>Git workflow consists of</p><ul><li>A working local directory: It is the local directory your working on</li><li>A Staging area: It is the area where you add changes you make to the working directory</li><li>A Repository: It is the place where Git permanently stores the changes</li></ul><h4>Create a local git repository</h4><p>When you want to create a new project on your computer using git, the first thing you do is create a new repository.</p><p>To create the repo, open up a terminal and move to where you want to place the project on your computer using the cd (change directory) command.</p><p>For example, if you want to create your project folder on your desktop, you will do something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe419e8b4728ee263f488def9ab34b29/href">https://medium.com/media/fe419e8b4728ee263f488def9ab34b29/href</a></iframe><p><strong><em>cd [directory-name]</em></strong><em> — moves to the given directory name</em></p><p><strong><em>mkdir [directory-name]</em></strong><em> — makes a new directory with the given name</em></p><pre><em> </em>git init</pre><p>This will create a hidden .git folder in your project folder on your computer. <strong>.git</strong> folder is the repository where it stores all the changes you make to any files within the project folder.</p><figure><img alt="The Noob Guide to GIT [Part 1] | LaptrinhX" src="https://cdn-images-1.medium.com/proxy/1*FFn632bcF4OFgZpXyLDKPw.png" /><figcaption>Create a hidden folder ‘.git’</figcaption></figure><h4><strong><em>Clone</em></strong><em> an existing repo</em></h4><pre>git clone &lt;your-copied-github-url&gt;</pre><p>This will download the repository from GitHub to your computer with the latest snapshot of the repo to your project folder.</p><p>To do this we need to navigate to the repo on Github and find a green button that says “clone or download”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1kbW1wWUaEo-ghi-.png" /><figcaption>Clone your repo by copying this URL</figcaption></figure><p>Once you click that button you’ll see a dropdown that provided you with a URL to copy. (Make sure to select the HTTPs format)</p><h4>Check the current <strong>status</strong> of your project</h4><pre>git status</pre><p>You can check your git status anytime you need to get additional information depending on the current status of your project, such as which files have recently been modified.</p><h4>Create a<strong> new branch</strong></h4><p>A branch creates a copy of the main repo and creates a branch that lets you make changes without changing the main branch.</p><pre>git branch &lt;new branch name&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*glh0xHuCBy9xCHBF.png" /><figcaption>Create a new branch</figcaption></figure><p>Creating a new branch allows you to work on a separate copy of your code without affecting the main branch. When you first create a branch, a copy of your main branch is created with a new name. You can then modify the code in a new branch. Once your new feature code is stable, then you can merge those changes into the main branch.</p><h4><strong>Check out</strong> an existing branch</h4><pre>git checkout &lt;existing-branch-name&gt;</pre><p>You can use git checkout when you want to resume from an existing checkpoint. There all your files will be reset to whatever state they were in on that particular branch.</p><p>If you want to keep any changes in your working directory without committing them locally, you can usegit stash .</p><h4><strong>Check out</strong> to a new branch</h4><p>Flag -b the flag is the shortcut to <em>create</em> a new branch.</p><pre>git checkout -b &lt;new-branch-name&gt;</pre><h4>Check the <strong>differences</strong> between checkpoints</h4><pre>git diff &lt;branch name&gt; &lt;other branchname&gt;</pre><p>Before committing your work, it is better to view the changes you have made, using git diff the command.</p><pre>Files which are used prefixed with &quot;-&quot; and colored red </pre><pre>Files which looks like now prefixed with &quot;+&quot; and colored green</pre><h4><strong>Stage</strong> your changes to prepare for committing them</h4><pre>git add &lt;files&gt;</pre><p>This command is useful for controlling exactly what you commit and will mark any changes you have made as “Staged” or “ready to be committed”. Even if you have changed the same files as before, those file changes will not automatically be staged.</p><p>If you need to know exactly what changes you made, you can just type git statusand see “Changes to be committed” in green and “Changes not staged for commit” in red.</p><p>If you want to add every file you change, just type git add --all .</p><h4><strong>Commit</strong> your staged changes</h4><pre>git commit</pre><p>This will ask you to type in a <strong>commit message</strong>. The commit message helps to understand what was changed.</p><p>The -m the flag is used to write a message. For example:</p><pre>git commit -m “Add a new feature”</pre><h4><strong>Push</strong> your branch to upload it somewhere else</h4><pre>git push origin &lt;branch-name&gt;</pre><p>This will upload the branch to the <strong>remote </strong>named<strong> </strong><strong>origin</strong> .</p><p>After pushing your changes, others can pull your branch to view your commits.</p><h4><strong>Fetch</strong> the latest info about a repo</h4><pre>git fetch</pre><p>This will download the latest info about the repo from origin .</p><h4><strong>Merge</strong> in changes</h4><p>Once you’re done adding the new feature to your branch, you’ll want to merge it into the main branch, so that your main has all of the features.</p><pre>git merge &lt;other-branch-name&gt;</pre><p>This will take all commits on the other-branch-name branch and integrate them into your own current branch.</p><p>You can use the <strong>pull</strong> command to both fetch and merge all in one step.</p><pre>git pull origin origin/master</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3AJQ1sADUshm5qgU.png" /><figcaption>Git Workflow Diagram</figcaption></figure><p>There’s a lot more you need to understand in order to become a git expert, but for now, you have some idea how it works. Thank you, and stay tuned for the second part.</p><p>Till then happy testing!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c97e701cecf9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/an-introduction-to-git-for-beginners-c97e701cecf9">An Introduction to Git for Beginners</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tips on How to Write Your First Successful Blog]]></title>
            <link>https://medium.com/chaya-thilakumara/how-to-write-an-effective-blog-in-10-easy-steps-b813fbce56e7?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/b813fbce56e7</guid>
            <category><![CDATA[easy-steps]]></category>
            <category><![CDATA[blogging]]></category>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[how-to-write]]></category>
            <category><![CDATA[effective]]></category>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Wed, 23 Dec 2020 05:28:30 GMT</pubDate>
            <atom:updated>2020-12-23T06:35:32.420Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a0Ve4jk_XRvWkC_SS1S79w.jpeg" /><figcaption><strong>[Sorce Photo: </strong><a href="https://unsplash.com/s/photos/writing-process?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><strong>Unsplash</strong></a><strong>]</strong></figcaption></figure><h3><strong>Tips on How to Write Your First Successful Blog</strong>​</h3><p><strong>6.7M</strong> people publish blogs on blogging websites, and 12M write blogs using their social networks.<br>(Source: <a href="https://writtent.com/blog/top-blogging-statistics-45-reasons-to-blog/">Top Blogging Statistics</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*m7eLBTqtHebmB_yCHjemDA.png" /></figure><blockquote>Thinking about becoming a blogger?</blockquote><blockquote><em>Great</em>. But you need to know a few things before you start.</blockquote><p>So from this article, you’ll learn effective ways of writing blogs that help you to consistently produce high-quality content.</p><h3><strong>Content Summary</strong></h3><ol><li>Cover Photo</li><li>Blog Title</li><li>Introduction</li><li>Table of Contents</li><li>Blog Body</li><li>Conclusion</li></ol><h3><strong>1. Cover Photo</strong></h3><p>A good cover photo is important as the title of your blog. It should be a good quality image and should match your topic. <strong>[</strong><a href="https://unsplash.com/"><strong>Unsplash</strong></a><strong>, </strong><a href="https://pixabay.com/"><strong>Pixabay</strong></a><strong>, and </strong><a href="https://www.pexels.com/"><strong>Pexels</strong></a><strong>]</strong></p><h3><strong>2. Blog Title</strong></h3><p>The title you create should be straight to the point and capture your reader’s attention. The blog title is one of the first things readers will be looking at when searching for information.</p><ul><li><strong>Use numbers — </strong>Most readers prefer <strong>Numbers </strong>in titles since most of our brains are focused on thinking of things in a logical manner.<strong> [</strong><a href="https://seotribunal.com/blog/blogging-statistics/"><strong>36% of users prefer list-based titles</strong></a><strong>]</strong></li><li><strong>Be personal</strong> — Including “<strong>You” </strong>in your title will address your reader more personal, and as if you are talking to them.</li><li><strong>Use “How to” — </strong>Starting your title with “<strong>How to” </strong>is a great way to appear in Google’s search.</li><li><strong>Hint at insider info </strong>— Telling users your post is for beginners, intermediate or advanced users.</li></ul><p><strong>Use templates — </strong>Most headlines are variations of <a href="https://sumo.com/stories/headline-formulas"><strong>proven formulas</strong></a>.</p><p><strong>Use Tool: </strong><a href="https://coschedule.com/headline-analyzer"><strong>Headline Analyzer</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*eEQyFTNefYNDj1FQn9gAXg.png" /><figcaption>Images of Bar charts: Overall Headline Preferences &amp; Preference By Gender <strong>[Source: Moz.com]</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*bR13CYkjDUNLvV3Lx4r4Ug.png" /><figcaption>An Image of Bar Chart Headline Superlative &amp; Image of Pie Chart Capitalization Preferences<strong> [Source: Moz.com]</strong></figcaption></figure><p>Summary of the research Overall Headline Preferences :</p><ul><li><strong>36%</strong> of people preferred titles with numbers</li><li><strong>21%</strong> of readers liked reader-addressing headlines</li><li><strong>17%</strong> wanted a headline to include “How to”</li></ul><p>A good article to visit that will help you determine the <a href="https://optinmonster.com/blogging-statistics/"><strong>Ultimate List of Blogging Statistics and Facts (Updated for 2020)</strong></a>.</p><h3><strong>3. Introduction</strong></h3><p>The introduction is the opening paragraph of your blog.</p><p>There are 3 important elements of a good blog introduction.</p><ol><li><strong>Hook: </strong>It can be a single sentence, a phrase, an open-ended or closed-ended question, or even a word that inspires the reader into your blog.</li><li><strong>Transition: </strong>The transition is the sentence that connects the hook to the body of the post and clarifies the title.</li><li><strong>Thesis:</strong> The thesis summarizes the topic and strengthens the reason why the reader should continue with your blog post idea.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*ZBN2cgCI2BtIYIJBvtZF2A.png" /><figcaption>3 important elements of a good blog post introduction [<a href="https://neilpatel.com/blog/the-ultimate-guide-to-writing-blog-post-introductions/">Source: The Ultimate Guide to Writing Blog Post Introductions</a>]</figcaption></figure><h3><strong>4. Table of Contents</strong></h3><p>Providing a table of contents helps improve the experience that the people reading your article will have.</p><ol><li>Clearly visible TOC heading​</li><li>Bullet points or numbering system​</li><li>Scannable titles​</li><li>Consistent titles​</li><li>The visible hierarchy for items and sub-items​</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*y0UcedpfRkIzmOD99U18fA.png" /><figcaption><strong>Source: </strong><a href="https://medium.com/automationmaster/sonarqube-c7df46614012">How to configure SonarQube for code quality</a></figcaption></figure><h3><strong>5. Blog Body</strong></h3><p>This is the place where your content is contained and where people will spend most of the time to read.</p><h4>5.1 Use simple language</h4><p>The point of any blog is to make it easy for anyone to understand and grasp the concept with as little effort as possible.</p><ul><li><strong>Use short paragraphs. </strong>Huge chunks of text daunt readers, but short paragraphs invite them in.<strong> </strong><a href="http://www.hemingwayapp.com/"><strong>Hemingway</strong></a><strong> ​</strong></li><li><strong>Break up long sentences.</strong> Break up the sentences by finding instances where you used “and,” “because,” and “that.”​</li><li><strong>Use formatting.</strong> Bold, italics, quotes, and lists break up chunks of copy and add extra emphasis to specific points.​</li></ul><p>Fix <a href="https://www.grammarly.com/blog/google-docs-beta-chrome/"><strong>grammar and spelling mistakes</strong></a> to make your content high quality.</p><p>When there is a lot of content, we consider starting a series, splitting the content into pieces. We also can link to other resources such as <a href="https://github.com/">Github.</a></p><h4><strong>5.2 Images</strong></h4><p>Blogs that have images get <a href="https://www.prdaily.com/visual-content-receives-94-percent-more-views-than-text-only-marketing/"><strong>94% more views</strong></a><strong> </strong>than those that don’t.</p><p>Your images should exactly convey the meaning you’re going to express since sometimes words will not enough to express the content and it will be easier for your reader to understand at a glance.</p><p><strong>5.2.1 Code blocks: </strong>Demonstrate your code, just insert it into a text box like below.</p><pre>System.setProperty(“webdriver.chrome.driver”, projectDir + “\binaries\chromedriver.exe”);<br> WebDriver driver = new ChromeDriver();<br> String baseUrl = “https://www.google.com&quot;;<br> driver.get(baseUrl);”</pre><p><strong>5.2.2 Featured images with headlines: </strong>Adding a featured image will help people to know the topic of the post.</p><p><strong>5.2.3 Meme images: </strong><a href="https://imgflip.com/">imgflip.com</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*LxZxS8gNwOqK7Zof3XZuxA.png" /><figcaption>Featured image with a headline &amp; meme image</figcaption></figure><p><strong>5.2.4 Diagrams: </strong>Diagrams are a fast way to explain complex concepts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*BVaNI5GLM8letn-M70_14w.png" /><figcaption>Images of diagrams</figcaption></figure><p><strong>5.2.5 Infographics &amp; Quote images</strong></p><p><strong>Quote images: </strong>Take your headline/quote and make it a visual piece of content. Tools: <a href="https://notegraphy.com/">Notegraphy</a>, <a href="http://www.quotescover.com/">QuotesCover</a></p><p><strong>Infographics: </strong>Infographics add a credible and informative element to solidify key points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*BPDC4zxzHXdd7X-p4Y8O0g.png" /><figcaption>Images of Infographics &amp; Quote images</figcaption></figure><p><strong>5.2.6 Screenshot images: </strong>For educational content, screenshots are the best way to express the flow. <strong>Tool: </strong><a href="http://jing.en.softonic.com/"><strong>Jing</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*rAqdpDjUqGjPHadb9wrS-g.png" /><figcaption>Screenshot image</figcaption></figure><p><strong>5.2.7 Spice up content with gifs: </strong>Tool - <a href="http://ezgif.com/">ezGIF</a></p><h4><strong>5.2 Optimize Image Text</strong></h4><p>Image text improves the ranking since it helps the search engine to find what the image is about, not only that but also improves accessibility for vision-impaired users who rely on screen readers.</p><p>An image’s text should:</p><ul><li>Describe the image in a helpful way</li><li>Be specific</li><li>Contain fewer than 125 characters</li><li>Include keywords</li></ul><h4><strong>5.3 Keyword Stuffing</strong></h4><p>Focus on one or two long-tail keywords, question-based phrases like “how to write a great blog post.” These keywords account for 70% of all search traffic on the web and provide more value than broad, high-volume keywords.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Clb51ltqGjD9IOHVkARSow.png" /><figcaption>[Source: RavenTools.com]</figcaption></figure><p>For the best impact, include keywords in the following elements of your post:</p><ul><li>Title tag</li><li>Headers</li><li>Body</li><li>URL</li><li>Meta description</li></ul><h4><strong>5.4 Use sub-headers to guide the reader</strong></h4><p>Subheaders are the best way to compartmentalize the post into informational sections.</p><ul><li><strong>Short and Concise — </strong>Convey your point as straight forward that someone will be able to grasp what they need from the provided content. Keep paragraphs themselves no longer than 2–3 sentences apiece.</li><li><strong>Evoke curiosity</strong> — The wording of your subheaders needs to evoke curiosity<strong> </strong>to keep the reader moving down the page without getting bored.</li></ul><h4>5.5 Use bulleted lists</h4><p>Using numbered or bulleted helps the reader to go through the content quickly.</p><h4><strong>5.6 Using Links</strong></h4><p>Rather than write out a whole separate explanation to something that ties into what you are talking about or backs it up, it’s best to insert a link. That way, your reader if they already understand or have heard of it before, can quickly move on.</p><h4>5.7 Reference other publications</h4><p>Take some time to refer authors and experts that have covered similar research to boost their visibility.</p><h4><strong>6.0 Conclusion</strong></h4><p>The conclusion should summarize everything in 3–5 sentences that you have discussed with your reader.</p><ul><li>Write a summary​</li><li>Ask a question​</li><li>Include a call-to-action (CTA)​</li><li>Provide links to another blog post​</li><li>Start a discussion​</li><li>Answer who, what, where, when, why, and how</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*fuwgkhkrUL1iXLpi2CnI0Q.png" /><figcaption>Source: <a href="https://sarahelson81.medium.com/how-to-get-attribute-value-in-selenium-webdriver-b0abbe68f93f">How To Get Attribute Value In Selenium WebDriver?</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*apgEMdAAdhQ0suoqDHM-ug.png" /></figure><p>Hopefully, there is something useful you can take from this when you write your blogs.</p><p>Good Luck !!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b813fbce56e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/how-to-write-an-effective-blog-in-10-easy-steps-b813fbce56e7">Tips on How to Write Your First Successful Blog</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sauce Labs: Local Testing Connection Though Office Network]]></title>
            <link>https://medium.com/chaya-thilakumara/sauce-labs-local-testing-connection-though-office-network-ea17365e23a2?source=rss----45c3990b2919---4</link>
            <guid isPermaLink="false">https://medium.com/p/ea17365e23a2</guid>
            <category><![CDATA[suacelabs]]></category>
            <category><![CDATA[localtunnel]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[local-testing]]></category>
            <category><![CDATA[proxy]]></category>
            <dc:creator><![CDATA[Chaya Thilakumara]]></dc:creator>
            <pubDate>Wed, 12 Aug 2020 03:24:23 GMT</pubDate>
            <atom:updated>2020-08-12T03:26:49.284Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L-_dj2IiUnJj7iPa.jpg" /></figure><h3><a href="https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy">Sauce Connect Proxy</a></h3><p>Sauce Connect Proxy™ is a built-in HTTP proxy server that opens a secure “tunnel” connection for testing between a Sauce Labs virtual machine or a real device and a website or a mobile app hosted on your local computer (“localhost”) or behind a corporate firewall. It provides a means for Sauce Labs to access your application or website.</p><h3>When is Sauce Connect Proxy Necessary?</h3><p>It is required only in situations where your website or app being tested in Sauce Labs is on a private network and not publicly accessible.</p><h3>Latest Version of Sauce Connect Proxy</h3><ol><li>Download the appropriate binary :</li></ol><pre>Latest Version:<strong> 4.6.2 (</strong>Sauce Connect Proxy Download Link)</pre><pre><a href="https://saucelabs.com/downloads/sc-4.6.2-osx.zip">Download Sauce Connect v4.6.2 for Mac OS 10.8+</a></pre><pre><a href="https://saucelabs.com/downloads/sc-4.6.2-win32.zip">Download Sauce Connect v4.6.2 for Windows 7+</a></pre><pre><a href="https://saucelabs.com/downloads/sc-4.6.2-linux.tar.gz">Download Sauce Connect v4.6.2 for Linux</a></pre><pre><a href="https://saucelabs.com/downloads/sc-4.6.2-linux32.tar.gz">Download Sauce Connect v4.6.2 for Linux 32-bit</a></pre><p>2. Unzip the binary to a folder/directory on your machine.</p><p>3. Open your command-line interface and navigate to the folder(containing the Local binary) then to the bin folder.</p><p>4. Run the binary using the following command:</p><pre>.\sc.exe -u &lt;Suace_Labs_UserName&gt; -k &lt;Suace_Labs_Password&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Esd1_49GViWgn91JYVe-oA.png" /></figure><pre>public static final String <em>USERNAME </em>= &quot;Sauce Labs UserName&quot;;<br>public static final String <em>ACCESS_KEY </em>= &quot;Sauce Labs Access Key&quot;;<br>public static final String <em>URL </em>= &quot;http://&quot; + <em>USERNAME </em>+ &quot;:&quot; + <em>ACCESS_KEY </em>+ &quot;@ondemand.us-west-1.saucelabs.com:443/wd/hub&quot;;</pre><pre>private WebDriver getSauceLabStackDriver() throws MalformedURLException {</pre><pre>        DesiredCapabilities caps = new DesiredCapabilities();<br>        caps.setBrowserName(&quot;chrome&quot;);<br>        caps.setCapability(&quot;platform&quot;, &quot;Windows 8.1&quot;);<br>        caps.setCapability(&quot;version&quot;, &quot;latest&quot;);<br>        caps.setCapability(&quot;name&quot;, &quot;Test1&quot;);<br>        caps.setCapability(&quot;extendedDebugging&quot;, &quot;true&quot;);<br>        caps.setCapability(&quot;buildNumber&quot;, &quot;3.0&quot;);<br>        caps.setCapability(&quot;username&quot;, <em>USERNAME</em>);<br>        caps.setCapability(&quot;accessKey&quot;, <em>ACCESS_KEY</em>);<br><br>        WebDriver driver = null;<br>        try {</pre><pre>            driver = new RemoteWebDriver(new URL(&quot;http://ondemand.saucelabs.com/wd/hub&quot;), caps);</pre><pre>        } catch (MalformedURLException e) {</pre><pre>            e.printStackTrace();<br>        }<br><br>        return driver;<br>    }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Y3WKZEANQRl3LQE6_NNHQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea17365e23a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chaya-thilakumara/sauce-labs-local-testing-connection-though-office-network-ea17365e23a2">Sauce Labs: Local Testing Connection Though Office Network</a> was originally published in <a href="https://medium.com/chaya-thilakumara">Chaya Thilakumara</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>