<?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[Stories by Ashimi Kathriarachchi on Medium]]></title>
        <description><![CDATA[Stories by Ashimi Kathriarachchi on Medium]]></description>
        <link>https://medium.com/@ashimikath?source=rss-3be1fa7a8867------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Ashimi Kathriarachchi on Medium</title>
            <link>https://medium.com/@ashimikath?source=rss-3be1fa7a8867------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:41:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashimikath/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[10 Java Coding Questions to Practise Before Your Next QA Automation Interview ]]></title>
            <link>https://medium.com/@ashimikath/10-java-coding-questions-to-practise-before-your-next-qa-automation-interview-f5a1bd6a870c?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5a1bd6a870c</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-11-12T09:31:01.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tud4_lIbx7xu58XynQVqFA.png" /></figure><p><em>Preparing for a Software Quality Engineer or QA Automation Engineer interview? Let’s strengthen your Java skills, one coding challenge at a time!</em></p><p>Have you ever looked at a coding question and wondered, “Where should I even start?”</p><p>Don’t worry! We’ve all been there. 😊</p><p>When preparing for a technical interview, practising coding questions can be one of the best ways to build confidence and improve your problem-solving skills.</p><p>If you’re aiming for a Software Quality Engineer or QA Automation Engineer role, having a good understanding of Java is particularly valuable. Whether you’re working with Selenium, Rest Assured, or building automation frameworks, strong programming fundamentals will always give you an advantage.</p><p>During my interview preparation, I spent time revisiting Java fundamentals and solving small coding challenges. I found that practising these questions helped me become more comfortable with programming logic and approaching unfamiliar problems.</p><p>So, if you’re also preparing for your next opportunity, here are 10 Java coding challenges worth adding to your practice list!</p><h3>Let’s get coding! ☕</h3><p><strong>1. Reverse a String</strong></p><p>This is one of those classic interview questions that looks simple but tests your understanding of loops and String manipulation.</p><p><strong>Example:</strong></p><pre>Input: Hello<br>Output: olleH</pre><p><strong><em>Hint:</em></strong><em> Try using a </em><em>for loop and start reading the characters from the last index.</em></p><p><strong>2. Check Whether a String Is a Palindrome?</strong></p><p>A palindrome is a word that reads the same forwards and backwards. Your task is to write a Java program to identify whether a given String is a palindrome.</p><p><strong>Example:</strong></p><pre>Input: madam<br>Output: Palindrome</pre><p><strong><em>Hint:</em></strong><em> Reverse the String and compare it with the original.</em></p><p><strong>3. Find Duplicate Elements in an Array</strong></p><p>Let’s put your array knowledge into practice! Given an array of integers, can you identify which numbers appear more than once?</p><p><strong>Example:</strong></p><pre>Input: [1, 2, 3, 2, 4, 5, 1]<br>Output: 1, 2</pre><p><strong><em>Hint:</em></strong><em> Think about nested loops or using a HashSet.</em></p><p><strong>4. Find the Largest Number in an Array</strong></p><p>Given a collection of numbers, find the highest value without using built-in sorting methods.</p><p><strong>Example:</strong></p><pre>Input: [10, 25, 5, 40, 15]<br>Output: 40</pre><p><strong><em>Hint:</em></strong><em> Start by assuming the first element is the largest, then compare it with the remaining elements.</em></p><p><strong>5. Find the Second Largest Number in an Array</strong></p><p>A small twist to the previous question! This one requires a little more logical thinking.</p><p><strong>Example:</strong></p><pre>Input: [10, 25, 5, 40, 15]<br>Output: 25</pre><p><strong><em>Hint:</em></strong><em> Keep track of the largest and second-largest values while iterating through the array. Remember to consider duplicate values and arrays with fewer than two distinct numbers.</em></p><p><strong>6. Count the Occurrence of Each Character in a String</strong></p><p>Given a String, count the occurrence of every character.</p><p><strong>Example:</strong></p><pre>Input: programming<br>Output: p = 1, r = 2, o = 1, g = 2, a = 1, m = 2, i = 1, n = 1</pre><p><strong><em>Hint:</em></strong><em> A HashMap can make this much easier.</em></p><p><strong>7. Reverse a Number</strong></p><p>This time, forget about Strings. Let’s work with integers!</p><p><strong>Example:</strong></p><pre>Input: 12345<br>Output: 54321</pre><p><strong><em>Hint:</em></strong><em> Think about the modulus (%) and division (/) operators.</em></p><p><strong>8. Find Missing Numbers in an Array</strong></p><p>Suppose you have numbers from 1 to 7, but some values are missing. Can you identify them?</p><p><strong>Example:</strong></p><pre>Input: [1, 2, 4, 6, 7]<br>Expected range: 1–7<br>Output: 3, 5</pre><p><strong><em>Hint:</em></strong><em> Compare the expected range with the numbers available in the array.</em></p><p><strong>9. Check Whether a Number Is Prime</strong></p><p>A prime number is divisible only by 1 and itself.</p><p><strong>Example:</strong></p><pre>Input: 7<br>Output: Prime Number</pre><p><strong><em>Hint:</em></strong><em> Check whether the number has any divisors other than 1 and itself.</em></p><p><strong>10. Generate the Fibonacci Series</strong></p><p>This is another popular beginner-level coding challenge.</p><p><strong>Example:</strong></p><pre>Input: 7 terms<br>Output: 0, 1, 1, 2, 3, 5, 8</pre><p><strong><em>Hint:</em></strong><em> Each new number is the sum of the previous two numbers.</em></p><h3>A Few Tips to Make Your Preparation More Effective💡</h3><p>While practising these questions, keep these simple tips in mind:</p><ol><li><strong>Understand before you memorise:</strong> Focus on understanding the logic rather than memorising the solution.</li><li><strong>Give yourself a challenge:</strong> Try solving each question independently before checking other solutions.</li><li><strong>Practise explaining your logic:</strong> Get comfortable explaining your approach, step by step, as if you were sitting in an interview.</li><li><strong>Explore different approaches:</strong> Sometimes there is more than one way to solve a problem. Try exploring alternative solutions.</li><li><strong>Don’t forget edge cases:</strong> Test your programs with empty inputs, negative numbers, duplicate values, and other scenarios.</li><li><strong>Be consistent:</strong> Even 20–30 minutes of daily coding practice can make a meaningful difference over time.</li></ol><h3>You’ve Got This! ❤️</h3><p>Remember, preparing for a technical interview isn’t about knowing everything. It’s about building confidence, strengthening your fundamentals, and learning how to approach problems logically.</p><p>If you’re just getting started with Java, don’t feel overwhelmed by the questions. Start with the basics, celebrate every problem you solve, and gradually challenge yourself with more complex problems.</p><p>Every coding challenge you complete is another step towards becoming a more confident engineer.</p><p><strong>Keep practising, keep learning, and most importantly, believe in yourself. Your next opportunity could be just around the corner!</strong></p><p>Happy Coding! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5a1bd6a870c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Most Needed Skills & Prompts to Become a Pro Prompt Quality Engineer]]></title>
            <link>https://medium.com/@ashimikath/most-needed-skills-prompts-to-become-a-pro-prompt-quality-engineer-2c97017d46c9?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c97017d46c9</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-07-30T09:31:01.840Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*byZFJbVMiwPtXOvOg4E6xA.png" /></figure><h3>The Core Skills You Need to Master</h3><p><strong>01</strong>. <strong>Context Setting</strong> means always telling the AI exactly what you’re testing, the feature name, the requirements, any limitations, and the tech stack you’re using. If you don’t give context, the AI has to guess, and guessing leads to weak or generic answers. But when you explain the situation clearly, the AI gives you answers that actually make sense for your work.</p><p><strong>02</strong>. <strong>Role-Based Prompting </strong>means telling the AI who it should act as before you ask your question. For example, you could say, “Act as a senior QA engineer reviewing this login feature.” This one small change makes a big difference. It shapes how deep, detailed, and relevant the answer becomes, almost like getting advice from a real expert instead of a generic bot.</p><p><strong>03</strong>. <strong>Structured Output Requests</strong> means asking the AI not just a question, but also telling it how you want the answer formatted. You can ask for a table, bullet points, or even JSON format. This way, the answer comes out organized and ready to use, instead of a messy block of text you have to clean up yourself.</p><p><strong>04</strong>. <strong>Iterative Refinement </strong>simply means your first prompt is never the final answer, it’s just a starting point. You ask, check the result, tweak your wording, and ask again. It’s very similar to a retest cycle in QA, where you keep adjusting until everything works exactly the way you want.</p><p><strong>05</strong>. <strong>Verification Mindset</strong> is the most important skill of all. Never trust AI output blindly. Always double check any test data, script, or logic it gives you. Treat it the same way you’d review a teammate’s code before approving it with a careful, questioning eye.</p><h3>The Most Needed Prompts for QA Work</h3><p>For generating test cases, you can say: “Generate positive, negative, and edge test cases for [feature], considering [constraints].”</p><p>For writing bug reports, try: “Convert these raw notes into a structured bug report with steps to reproduce, expected result, and actual result.”</p><p>For creating test data, ask: “Generate 10 realistic sample records for [entity], including valid and invalid variations.”</p><p>For automation scripting, use: “Write a Selenium/Playwright script to validate [scenario] using [language].”</p><p>For reviewing requirements, ask: “Review this user story for ambiguity, missing acceptance criteria, or testability gaps.”</p><p>For regression testing, try: “Create a regression test checklist for [module] based on these recent changes: [list].”</p><p>For API testing, use: “Generate Postman/REST Assured test cases for this API endpoint: [endpoint details].”</p><p>The best way to learn prompt engineering is simply to use AI every day on real tasks, not just tutorials apply it directly to your actual sprint work. Build a personal prompt library by saving prompts that worked well, so you can reuse them later. Try comparing outputs by running the same task with two or three different phrasings, and notice which one works best. Study official guides from OpenAI, Google, and Microsoft, since they all offer free resources on this topic. And most importantly, practice like you would with regression testing keep refining your prompts again and again until the results become reliable every time.</p><p>A great habit to build is keeping a simple “prompt and result” log, just like a test execution log. Over time, this log becomes your own personal playbook, and slowly you become the go to person on your team who understands both QA and AI a true AI-QE hybrid.</p><p>You don’t need to know how to code to master prompt engineering. All you really need is the same discipline you already use in testing structure, patience to iterate, and the habit of verifying everything. If you build those three habits, you’re already halfway to becoming a pro.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c97017d46c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prompt Engineering for Quality Engineers]]></title>
            <link>https://medium.com/@ashimikath/prompt-engineering-for-quality-engineers-28b4f380ad8a?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/28b4f380ad8a</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Wed, 29 Jul 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-07-29T09:31:01.508Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3xboYK2_y380KxwbtI9lA.png" /></figure><p>Think of prompt engineering as writing precise test cases — but for AI instead of software. Just as a poorly written test case gives unreliable results, a poorly written prompt gives unreliable AI output. For a Quality Engineer, this is a natural skill extension, not a foreign one.</p><p>In simple terms, Prompt engineering is the skill of instructing AI tools (like ChatGPT, Copilot, or Gemini) clearly enough that they generate accurate, useful, and repeatable results like test cases, bug reports, automation scripts, or documentation.</p><p><em>A vague prompt = a vague bug report. Both lead to confusion and wasted time. A clear prompt = a clear test case. Both lead to reliable outcomes.</em></p><p>Quality Engineers already think in a way that’s perfect for prompt engineering:</p><ul><li>They break requirements into testable conditions</li><li>They think about edge cases and negative scenarios</li><li>They value repeatability and precision</li></ul><p>So learning prompt engineering isn’t starting a new skill from scratch rather it’s applying an existing QA mindset to a new tool.</p><h4><strong>Where QEs Use Prompt Engineering Today</strong></h4><ul><li>To generating test cases from user stories.</li><li>Turning messy notes into structured bug reports.</li><li>Creating test data quickly.</li><li>Getting help writing automation scripts.</li><li>Reviewing requirements for ambiguity.</li></ul><h4><strong>Pros of Prompt Engineering for QA</strong></h4><p>01.Speed: Cuts down time spent on repetitive tasks like writing test cases or documentation.</p><p>02. Consistency: Well structured prompts produce standardized output formats every time.</p><p>03. Career growth: Positions QE as an “AI-augmented” role, not just a manual tester.</p><p>04. Low entry barrier: No coding required to start experimenting.</p><p>05. Better requirement reviews: AI can spot ambiguity or missing criteria faster than manual review alone.</p><h3>Cons of Prompt Engineering for QE</h3><p>01. AI Can Sound Right But Be Wrong: AI can confidently produce incorrect test data or scenarios. Human verification is still mandatory. Sometimes AI gives answers that sound confident and correct, but they’re actually made up or incorrect.</p><p>02. Over reliance danger: Leaning too much on AI can dull critical thinking skills over time.</p><p>03. Constant evolution: Prompt techniques that work today may become outdated as models update.</p><p>04. Not a replacement: AI doesn’t understand your actual system, it only responds to what you tell it.</p><p>05. Quality varies by tool: Different AI models respond differently to the same prompt.</p><p>Prompt engineering isn’t about replacing QE skills, it’s about amplifying them. The QE professionals who learn to communicate effectively with AI will become the most valuable hybrid testers of the next generation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28b4f380ad8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hybrid BDD: Why Not Every Given Needs a Browser]]></title>
            <link>https://medium.com/@ashimikath/hybrid-bdd-why-not-every-given-needs-a-browser-a0d6f1963346?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0d6f1963346</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-07-21T09:31:01.646Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1q8mJBPaVrnWB4gyfKsalQ.png" /></figure><p>Your BDD suite is solid. Every scenario reads clean, stakeholders understand it, automation is passing. But every single test spins up a browser, clicks through a signup form, waits for page loads… just to get to the part you actually wanted to test.</p><p>Here’s the fix: not every <em>Given </em>needs a browser.</p><p>Pure UI driven scenarios are slow and flaky by nature every extra click through a form is another chance for a stale element, a timing issue, or a slow network call to break your test. And most of that clicking isn’t even what you’re testing. It’s just <em>getting to</em> what you’re testing.</p><p>APIs are faster and more reliable for setting up state creating users, seeding data, configuring accounts. Save the UI for what you’re actually validating: does the dashboard render correctly, does the right data show up, does the flow behave the way a real user would experience it.</p><p>This is the same principle from chaining REST Assured calls reusing data across requests just now spanning both the API and UI layers.</p><p>Here’s what a hybrid scenario looks like:</p><pre>Feature: User Dashboard<br>  Scenario: New user sees personalized dashboard after login<br>    Given a user exists via API with valid credentials<br>    When I log in through the UI<br>    Then I should see the dashboard with my username displayed</pre><p><em>Notice: the Given step never touches the browser. It&#39;s a REST Assured call in disguise, hidden behind plain English.</em></p><pre>@Given(&quot;a user exists via API with valid credentials&quot;)<br>public void createUserViaApi() {<br>    Response response = given()<br>        .contentType(&quot;application/json&quot;)<br>        .body(userPayload)<br>        .when()<br>        .post(&quot;/api/users&quot;);<br><br>    testContext.setUsername(response.jsonPath().getString(&quot;username&quot;));<br>    testContext.setPassword(userPayload.getPassword());<br>}</pre><p>This step runs in milliseconds instead of seconds, and it doesn’t depend on any UI being loaded first. No signup form, no clicking through fields just a direct call that gets your test data ready.</p><p>This is the real crux of hybrid BDD. Your TestContext object the same one from setting up dependency injection in your BDD framework now carries data across both layers:</p><pre>@When(&quot;I log in through the UI&quot;)<br>public void loginThroughUi() {<br>    loginPage.open();<br>    loginPage.login(testContext.getUsername(), testContext.getPassword());<br>}</pre><p>Same Context object, same setup you already built. Nothing new to learn here just applying the pattern across API and UI in the same scenario.</p><pre>@Then(&quot;I should see the dashboard with my username displayed&quot;)<br>public void verifyDashboard() {<br>    Assert.assertEquals(testContext.getUsername(), dashboardPage.getDisplayedUsername());<br>}</pre><p>This is the one thing an API call can’t verify actual rendered UI behavior. That’s exactly why you don’t go 100% API only. The API sets the stage, the UI proves the user experience actually works.</p><p>Use API only steps for setup and teardown creating test data, resetting state, anything that just needs to <em>exist</em> before your real test starts.</p><p>Use UI steps only for the actual behavior being tested the layout, the visual state, the flow a real user would experience.</p><p>Use pure API BDD with no UI at all for backend only features that have no frontend impact no reason to open a browser if nothing renders.</p><p>Forgetting cleanup. API created test data that never gets deleted leads to database bloat and flaky “duplicate user” errors down the line.</p><p>Sync assumptions. Your API call finishes instantly, but the UI might need a moment to reflect that new state. Don’t assume zero wait time just because setup was fast you’ll trade UI flakiness for a different kind of flakiness.</p><p>Overusing API steps. If you strip out too much and your scenario stops describing real user behavior, you’ve defeated the whole point of BDD. The goal is speed and reliability, not skipping the parts that actually matter.</p><p>Forgetting cleanup. API created test data that never gets deleted leads to database bloat and flaky “duplicate user” errors down the line.</p><p>Sync assumptions. Your API call finishes instantly, but the UI might need a moment to reflect that new state. Don’t assume zero wait time just because setup was fast you’ll trade UI flakiness for a different kind of flakiness.</p><p>Overusing API steps. If you strip out too much and your scenario stops describing real user behavior, you’ve defeated the whole point of BDD. The goal is speed and reliability, not skipping the parts that actually matter.</p><p>Hybrid BDD isn’t about abandoning UI testing it’s about being deliberate. Use APIs for what’s fast and repeatable, use the UI for what actually needs a human-facing check, and let your shared Context object tie both worlds together seamlessly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0d6f1963346" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BDD Framework from Scratch: A QE’s Guide to Cucumber + Java]]></title>
            <link>https://medium.com/@ashimikath/bdd-framework-from-scratch-a-qes-guide-to-cucumber-java-36f64c31eb6b?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/36f64c31eb6b</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-07-20T09:31:01.750Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nsEhUT-l9BiIt_jSXNk0pQ.png" /></figure><p>If you’ve ever handed a bug report to a PM and watched their eyes glaze over at words like assertEquals or WebElement, you already understand why BDD exists.</p><p>Behavior Driven Development isn’t just “Cucumber syntax.” It’s a way of writing tests so that QEs, developers, and business stakeholders can all read the same sentence and agree on what “correct” looks like while still giving engineers a fully automatable framework underneath.</p><p>BDD extends TDD by writing specifications in a structured, natural language format (Gherkin) that maps directly to executable code. The scenario is the test case there’s no translation layer between “requirement” and “automated test.”</p><pre>Given I am on the login page<br>When I enter valid username and password<br>Then I should see the dashboard</pre><p>A Cucumber + Java framework is built from four components, each with a distinct responsibility:</p><p>1. Feature files (.feature) Written in Gherkin. Contain Feature, Scenario, Scenario Outline, and Examples blocks. Parsed by Cucumber’s Gherkin parser at runtime — not compiled, so syntax errors only surface at execution.</p><p>2.Step definitions Java methods annotated with @Given, @When, @Then that use either regex or Cucumber Expressions to bind to feature file text. These methods should be thin — delegating actual logic to Page Objects or API clients, not embedding assertions or waits directly.</p><p>3. Runner class Bridges Cucumber to your test execution engine (JUnit 4/5 or TestNG) via @CucumberOptions:</p><pre>@RunWith(Cucumber.class)<br>@CucumberOptions(<br>    features = &quot;src/test/resources/features&quot;,<br>    glue = {&quot;stepdefinitions&quot;, &quot;hooks&quot;},<br>    plugin = {&quot;pretty&quot;, &quot;html:target/cucumber-reports.html&quot;},<br>    tags = &quot;@smoke&quot;<br>)<br>public class TestRunner {}</pre><p><em>Note: with JUnit 5, you’d use @Suite and @ConfigurationParameter instead of @CucumberOptions.</em></p><p>4. Hooks @Before and @After methods for setup/teardown, scoped per-scenario:</p><pre>@Before<br>public void setUp() {<br>    driver = DriverFactory.initDriver();<br>}<br><br>@After<br>public void tearDown(Scenario scenario) {<br>    if (scenario.isFailed()) {<br>        byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);<br>        scenario.attach(screenshot, &quot;image/png&quot;, &quot;failure-screenshot&quot;);<br>    }<br>    driver.quit();<br>}</pre><h3>Project Structure</h3><pre>src/test/java/<br>  ├── stepdefinitions/<br>  ├── runners/<br>  ├── hooks/<br>  ├── pages/<br>  └── utils/<br>src/test/resources/<br>  └── features/<br>pom.xml (cucumber-java, cucumber-junit, selenium-java)</pre><h3>Writing a Scenario and Its Step Definitions</h3><pre>Feature: User Login<br>  Scenario: Successful login with valid credentials<br>    Given I am on the login page<br>    When I enter valid username and password<br>    Then I should see the dashboard</pre><pre>public class LoginSteps {<br><br>    private LoginPage loginPage = new LoginPage(driver);<br>    private DashboardPage dashboardPage = new DashboardPage(driver);<br><br>    @Given(&quot;I am on the login page&quot;)<br>    public void navigateToLogin() {<br>        loginPage.open();<br>    }<br><br>    @When(&quot;I enter valid username and password&quot;)<br>    public void enterCredentials() {<br>        loginPage.login(&quot;user&quot;, &quot;pass123&quot;);<br>    }<br><br>    @Then(&quot;I should see the dashboard&quot;)<br>    public void verifyDashboard() {<br>        Assert.assertTrue(dashboardPage.isDisplayed());<br>    }<br>}</pre><p>Step definitions call into Page Object methods, not raw Selenium calls this keeps the glue code stable even if locators or flows change.</p><h3>Data-Driven Scenarios with Scenario Outline</h3><pre>Scenario Outline: Login with multiple credential sets<br>  Given I am on the login page<br>  When I enter username &quot;&lt;username&gt;&quot; and password &quot;&lt;password&gt;&quot;<br>  Then I should see &quot;&lt;result&gt;&quot;<br><br>  Examples:<br>    | username | password  | result       |<br>    | user1    | pass123   | dashboard    |<br>    | user2    | wrongpass | error message|</pre><p>Cucumber executes the scenario once per row, substituting placeholders into the step text at runtime.</p><h3>State Management Across Steps</h3><p>Since each step definition class is instantiated fresh per scenario, sharing state (e.g., an auth token or generated ID) requires either:</p><ul><li>A shared Context/World object injected via constructor into all step classes, or</li><li>A dependency injection framework like PicoContainer or Spring wired through cucumber-picocontainer / cucumber-spring.</li></ul><pre>public class TestContext {<br>    private String authToken;<br>    // getters/setters<br>}</pre><p>Inject this into each step definition class’s constructor so state flows naturally between Given, When, and Then without static variables.</p><h3>Common Technical Pitfalls</h3><ul><li>Ambiguous step definitions: two regex/Cucumber Expressions that both match the same step text cause DuplicateStepDefinitionException at runtime.</li><li>Implementation leakage into Gherkin: steps like Given I click element with xpath “//button[2]” couple your spec to the DOM and break the abstraction BDD is meant to provide.</li><li>Thread-safety in parallel execution: if running scenarios in parallel (cucumber.execution.parallel.enabled=true for JUnit 5), driver instances and Context objects must be thread-local, not static/shared.</li><li>Tag misuse: overusing tags for control flow (@skip-if-x) instead of using them purely for test categorization/filtering.</li></ul><h3>Reporting</h3><p>The plugin option in @CucumberOptions supports multiple formats simultaneously — pretty for console, html for a static report, and json/junit formats for CI integration (e.g., feeding into Allure or Jenkins test trend graphs).Where This Goes Next</p><p>The natural extension is combining this framework with API testing — writing Given a user exists via API steps that call REST Assured directly instead of driving the UI, giving you hybrid BDD scenarios that are faster and less flaky than pure UI automation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36f64c31eb6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Postman to Automation: Writing Your First REST Assured Test]]></title>
            <link>https://medium.com/@ashimikath/from-postman-to-automation-writing-your-first-rest-assured-test-996fbdd112ab?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/996fbdd112ab</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Sun, 19 Jul 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-07-19T09:31:01.656Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJyBEWV89ZVkX42780Ji2A.png" /></figure><p>Manual testing in Postman is great for exploring an API, but at some point, you need those checks to run automatically on every build, every commit, without anyone clicking “Send.” That’s where REST Assured comes in: it lets you write the same API validations you’ve been doing manually in Postman, but as real, repeatable Java code.</p><p>Here’s how a simple, well-structured REST Assured project comes together.</p><p>The foundation starts with a base class that holds shared setup things like the base URI, common headers, or authentication that every test needs. Instead of repeating this in every test file, a BaseAPI class centralizes it, and individual test classes simply extend it. This mirrors the same &quot;don&#39;t repeat yourself&quot; principle you&#39;d apply anywhere else in test automation.</p><p>Next comes a Page Object-style model, but for APIs instead of UI elements. An APIPage class represents the shape of the data you&#39;re sending and receiving fields like usetId, title, and body. Instead of building a JSON body manually in every test, you create an object once and reuse it, which makes tests far more readable and consistent.</p><p>With that structure in place, writing the actual tests becomes straightforward. A GET test might look like this:</p><pre>Response response = given()<br>        .when()<br>        .get(&quot;/users/1&quot;);<br>Integer statusCode = response.getStatusCode();<br>assertThat(statusCode.equals(200));</pre><p>Simple: send a request, capture the response, verify the status code. No UI to wait on, no manual clicking just a fast, direct check.</p><p>A POST test builds on the same idea, but sends data along with the request:</p><pre>APIPage apiPage = new APIPage(1, &quot;Hello&quot;, &quot;Hi Hello&quot;);<br>APIPage newApiPage = given()<br>        .contentType(&quot;application/json&quot;)<br>        .body(apiPage)<br>        .when()<br>        .post(&quot;/posts&quot;)<br>        .then()<br>        .extract().as(APIPage.class);<br>assertThat(newApiPage.getBody()).isEqualTo(&quot;Hi Hello&quot;);<br>assertThat(newApiPage).isNotNull();<br>assertThat(newApiPage.getTitle()).isEqualTo(&quot;Hello&quot;);</pre><p>This test creates a request body using the APIPage object, sends it as JSON, and then deserializes the response back into the same object type. From there, assertions check that the returned data matches what was sent — validating that the API actually processed the request correctly, not just that it responded.</p><p>A PATCH test follows the same pattern, just updating existing data instead of creating new data:</p><pre>APIPage patchApiPage = new APIPage(1, &quot;Hello Update&quot;, &quot;Hi Hello Update&quot;);<br>APIPage newApiPage = given()<br>        .contentType(&quot;application/json&quot;)<br>        .body(patchApiPage)<br>        .when()<br>        .patch(&quot;/posts/1&quot;)<br>        .then()<br>        .extract().as(APIPage.class);<br>assertThat(newApiPage.getBody()).isEqualTo(&quot;Hi Hello Update&quot;);<br>assertThat(newApiPage).isNotNull();<br>assertThat(newApiPage.getTitle()).isEqualTo(&quot;Hello Update&quot;);</pre><p>Same reusable model, same clean pattern — just a different HTTP method and updated values, proving how little extra effort it takes to cover another scenario once the structure is in place.</p><p>Finally, a DELETE test rounds out the full CRUD coverage:</p><pre>Response response = given()<br>        .when()<br>        .delete(&quot;/users/1&quot;);<br>Integer statusCode = response.getStatusCode();<br>assertThat(statusCode.equals(200));</pre><p>No request body needed here just confirming that the resource was removed successfully by checking the response status code. Simple, but essential: DELETE is often overlooked in test suites, yet it’s just as important to verify as creating or updating data.g</p><p>What makes this approach powerful isn’t just the code itself it’s the structure behind it. A shared base class avoids duplication. A model class keeps request/response data consistent and readable. And tests, at that point, become short, focused, and easy for any teammate to understand at a glance. Together, GET, POST, PATCH, and DELETE now give this suite full CRUD coverage for the API.</p><p>This is the real bridge from manual to automated testing: the same checks you were clicking through in Postman now run in seconds, as part of your build, catching regressions before they ever reach a human tester.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=996fbdd112ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Organizing Postman Collections for Scalable API Testing]]></title>
            <link>https://medium.com/@ashimikath/organizing-postman-collections-for-scalable-api-testing-00f9b15ded69?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/00f9b15ded69</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Sat, 18 Jul 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-07-18T09:31:01.572Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HuF5Kcc6A_i0WS77XaO_Dw.png" /></figure><p>As API test suites grow, an unorganized Postman workspace quickly becomes a bottleneck — hard to navigate, error-prone across environments, and difficult for new team members to pick up. This post covers two practical patterns: environment variables and structured collection folders.</p><p>A common anti-pattern is hardcoding environment details directly into request URLs:</p><pre>https://api.example-service.com/qa/v1/resource</pre><p>To test the same request against lower environment or Production, someone has to manually edit the URL each time, a process that’s slow and prone to mistakes, including accidentally sending a test request to the wrong environment.</p><p>Instead, store the environment specific part of the request as a variable:</p><pre>https://api.example-service.com/{{env}}/v1/resource</pre><p>Then define separate Postman environments (e.g., QA, SIT, UAT, PERF, PRODUCTION), each with its own values:</p><p>Switching environments becomes a single dropdown selection in Postman, no manual editing, no copy-paste errors.</p><p><em>Security note: Sensitive values like API keys and tokens should always be stored as secured/secret variables, never hardcoded into request bodies or committed to shared/exported collections.</em></p><p>A single collection with dozens (or hundreds) of ungrouped requests becomes difficult to search and maintain. Finding a specific endpoint often means scrolling through an unstructured list with inconsistent naming.</p><p>A more maintainable structure organizes requests hierarchically:</p><pre>Collection: My Service<br>├── Component A<br>│   ├── GET<br>│   ├── POST<br>│   ├── PUT<br>│   └── DELETE<br>├── Component B<br>│   ├── GET<br>│   ├── POST<br>│   └── DELETE</pre><p>Benefits of this structure:</p><ul><li>One folder per component/service — groups related endpoints logically</li><li>Subfolders by HTTP method — makes locating a specific request predictable and fast</li><li>Easier onboarding — new team members can explore the API surface without a walkthrough</li><li>Better maintainability — adding a new endpoint has an obvious place to go</li></ul><p>Organizing a Postman workspace with environment variables and structured folders isn’t just about tidiness. It directly reduces testing errors, speeds up navigation, and lowers the onboarding cost for new team members. A small upfront investment in structure pays for itself many times over as a test suite scales.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00f9b15ded69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why API Testing Matters: Testing Beneath the UI Layer]]></title>
            <link>https://medium.com/@ashimikath/why-api-testing-matters-testing-beneath-the-ui-layer-63fb672f9a61?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/63fb672f9a61</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Fri, 17 Jul 2026 09:31:01 GMT</pubDate>
            <atom:updated>2026-07-17T09:31:01.516Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n5emoCdZiZGQyehYPqFHow.png" /></figure><p>Most applications are built in layers: a UI on top, business logic and data processing underneath, and APIs connecting it all together. While UI testing validates what users see, API testing validates what actually powers that experience and it deserves equal, if not greater, priority in a test strategy.</p><p>An API test typically validates a few core things:</p><ul><li>HTTP Method — GET, POST, PUT, PATCH, DELETE</li><li>Status Code — e.g., 200 (OK), 201 (Created), 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), 500 (Server Error)</li><li>Request Structure — headers, query/path parameters, request body</li><li>Response Structure — body content, headers, and whether returned data matches expectations</li></ul><p>Testing at this layer has real advantages.</p><p>1. Faster feedback API responses return in milliseconds. There’s no UI rendering, no waiting for pages to load. It just the raw request/response cycle. This makes API tests significantly faster to run and iterate on than UI driven tests.</p><p>2. Earlier bug detection since APIs sit below the UI, testing them catches issues before they ever surface as a broken button or missing data on screen. This shortens the feedback loop and reduces the cost of fixing defects later in the pipeline.</p><p>3. More precise failure isolation — a failing UI test can have many possible causes like rendering issues, timing, broken selectors, or an actual backend problem. A failing API test points directly to the component responsible, making root-cause analysis much faster.</p><p>4. Stability UI tests are often flaky due to timing, animations, or DOM changes. API tests are generally more deterministic, making them a more reliable layer to build automated regression coverage on.</p><p>API testing isn’t a replacement for UI testing, it’s a complementary layer. A well-balanced strategy typically follows the testing pyramid:</p><ul><li>Unit tests — fastest, most numerous, test individual functions/methods</li><li>API tests — validate business logic and integrations without UI overhead</li><li>UI tests — fewer in number, validate critical end-to-end user flows</li></ul><p>Investing more heavily in the API layer means catching more bugs, faster, with less maintenance overhead than an all UI test suite.</p><p>API testing isn’t just a technical checkbox it’s often the most efficient place to catch bugs early, get fast feedback, and build a stable automated regression suite. Prioritizing this layer pays off in speed, reliability, and long-term maintainability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63fb672f9a61" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When to Use for, while, and for-each in Java]]></title>
            <link>https://medium.com/@ashimikath/when-to-use-for-while-and-for-each-in-java-d037502dbc15?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/d037502dbc15</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 09:31:00 GMT</pubDate>
            <atom:updated>2026-07-13T09:31:00.747Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a3j3i2DjPadEsSsU4p0LVw.png" /></figure><p>The one question that instantly tells you which loop to use</p><p>Every time you write a loop, ask yourself one question:</p><blockquote><em>“Do I know HOW MANY times I need to loop?”</em></blockquote><p>That’s it. That single question unlocks the right choice:</p><ul><li>✅ Yes, exactly N times → use for</li><li>❓ Not sure — depends on a condition → use while</li><li>📦 I just want to visit every item → use for-each</li></ul><p>Let me break each one down with real examples.</p><h3>1️⃣ for — When You Know the Count</h3><p>Use for when you need to loop a fixed number of times or when you need the index</p><pre>// Print numbers 1 to 10<br>for (int i = 1; i &lt;= 10; i++) {<br>    System.out.println(i);<br>}<br><br>// When you need the index for array access<br>for (int i = 0; i &lt; arr.length; i++) {<br>    System.out.println(&quot;Index &quot; + i + &quot;: &quot; + arr[i]);<br>}</pre><p>Signal words: <em>“loop N times”, “iterate through indexes”, “I need to know WHERE I am”</em></p><p>Golden rule: <em>If you need the index or a counter, use </em><em>for.</em></p><h3>2️⃣ while — When You Don&#39;t Know How Many Times</h3><p>Use while when the loop depends on a condition, not a count.</p><pre>// Read input until user types &quot;quit&quot;<br>String input = &quot;&quot;;<br>while (!input.equals(&quot;quit&quot;)) {<br>    input = scanner.nextLine();<br>}<br><br>// Retry logic — common in test automation!<br>int attempts = 0;<br>boolean success = false;<br>while (!success &amp;&amp; attempts &lt; 3) {<br>    success = tryLogin();<br>    attempts++;<br>}</pre><p>Signal words: <em>“keep going UNTIL…”, “as long as…”, “retry until…”</em></p><p>Golden rule: <em>If the loop depends on a runtime condition, use </em><em>while.</em></p><h3>3️⃣ for-each — When You Just Want to Visit Every Item</h3><p>This is the cleanest loop — and probably the one you should use most often.</p><pre>int[] arr = {10, 20, 30};<br>for (int num : arr) {<br>    System.out.println(num);<br>}<br><br>// Works beautifully with collections<br>List&lt;String&gt; names = Arrays.asList(&quot;Alice&quot;, &quot;Bob&quot;, &quot;Charlie&quot;);<br>for (String name : names) {<br>    System.out.println(name);<br>}</pre><p>Signal words: <em>“for each item…”, “go through every element”, “I DON’T need the index”</em></p><p>Golden rule: <em>If you just want to visit each item — no index, no counter — use </em><em>for-each.</em></p><p>⚠️ Watch out: You can’t modify the collection while iterating with for-each. If you need to remove items, use a classic for loop with an index.</p><h3>🎯 Same Problem, All Three Ways</h3><p>Let’s print every element in int[] arr = {10, 20, 30}:</p><p>Using for:</p><pre>for (int i = 0; i &lt; arr.length; i++) {<br>    System.out.println(arr[i]);<br>}</pre><p>Using while:</p><pre>int i = 0;<br>while (i &lt; arr.length) {<br>    System.out.println(arr[i]);<br>    i++;<br>}</pre><p>Using for-each:</p><pre>for (int num : arr) {<br>    System.out.println(num);<br>}</pre><p>Try answering these instantly:</p><ol><li>Sum numbers from 1 to 100 → ?</li><li>Read numbers from a user until they enter -1 → ?</li><li>Print all names in a List&lt;String&gt; → ?</li><li>Retry an API call up to 5 times or until it succeeds → ?</li><li>Reverse an array using two pointers → ?</li></ol><p>Answers:</p><ol><li>for — fixed count</li><li>while — unknown iterations, condition-based</li><li>for-each — just visiting each item</li><li>while — two exit conditions</li><li>while (or for with two counters) — condition-based</li></ol><p>If you got all five right, you’re already thinking like a senior developer. 🎯</p><h3>🎁 The Cheat Card</h3><p>Print this. Stick it on your monitor. Never blank on a loop choice again:</p><p>🔹 for — <em>&quot;Count-based&quot;</em> → Use when you know the exact number of iterations OR need the index.</p><p>🔹 while — <em>&quot;Condition-based&quot;</em> → Use when the loop continues based on a runtime condition.</p><p>🔹 for-each — <em>&quot;Visit-each&quot;</em> → Use when you just want to process every item in a collection.</p><h3>The Real Lesson</h3><p>Choosing the right loop isn’t about syntax — it’s about communicating intent.</p><p>When another developer (or your future self) reads your code:</p><ul><li>for says: <em>&quot;I&#39;m counting.&quot;</em></li><li>while says: <em>&quot;I&#39;m waiting for something.&quot;</em></li><li>for-each says: <em>&quot;I&#39;m processing every element.&quot;</em></li></ul><p>Great code isn’t just about <em>working</em>. It’s about being obvious.</p><p>Next time you’re about to write a loop, pause for two seconds and ask:</p><blockquote>“Do I know how many times? Do I know when to stop? Or do I just want to visit each item?”</blockquote><p>Two seconds. That’s all it takes to write code that reads itself.</p><p><em>If this helped, give it a clap 👏 and follow for more practical developer notes from real interview prep. What’s the loop mistake you catch yourself making most often? Drop it in the comments — I’d love to know I’m not alone.</em> 😄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d037502dbc15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 3-Minute CSS Selector Cheat Sheet — Logic You’ll Never Forget]]></title>
            <link>https://medium.com/@ashimikath/the-3-minute-css-selector-cheat-sheet-logic-youll-never-forget-952764f42f1d?source=rss-3be1fa7a8867------2</link>
            <guid isPermaLink="false">https://medium.com/p/952764f42f1d</guid>
            <dc:creator><![CDATA[Ashimi Kathriarachchi]]></dc:creator>
            <pubDate>Sun, 12 Jul 2026 07:31:00 GMT</pubDate>
            <atom:updated>2026-07-12T07:31:00.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m65JXLlM_bLwLMoU4O--EA.png" /></figure><p><em>Learn once. Remember forever. Read in 3 minutes.</em></p><p>CSS Selectors follow one simple logic:</p><blockquote><em>🗺️ </em>HTML is a family tree. Selectors are directions to a family member.</blockquote><p>Once you get that, everything clicks. 🔑</p><h3>The 5 Symbols That Do 90% of the Work</h3><p># → id Unique, like a #hashtag. Example: #login-btn</p><p>. → class Reusable, like a .category. Example: .error-message</p><p>[ ] → attribute A label on the element. Example: [type=&#39;checkbox&#39;]</p><p>(space) → inside Walk deeper into the tree. Example: form input</p><p>&gt; → direct child One step down, no skipping. Example: form &gt; input</p><p>👉 Master these five. That’s the game.</p><h3>The 3 Questions That Solve Any Selector 🔑</h3><p>Every time you need to locate an element, ask:</p><p>1. 🎯 Where do I start? → Find something unique</p><p>2. 🚶 Where do I go? → Walk inside the tree</p><p>3. 👆 Which one do I want? → Narrow it down</p><p>That’s the whole logic. Three questions. Every single time.</p><h3>The Selector Priority Ladder 🥇</h3><p>Always climb from the top. Only go lower when you must:</p><p>🥇 id → #login-btn <em>Most stable. Always try this first.</em></p><p>🥈 name → [name=&#39;email&#39;] <em>Great for form fields.</em></p><p>🥉 test attribute → [data-testid=&#39;submit&#39;] <em>The gold standard for automation.</em></p><p>4️⃣ meaningful class → .error-message <em>Reliable if the class is specific.</em></p><p>5️⃣ parent + child combo → .sidebar a <em>When you need context.</em></p><p>6️⃣ position (last resort) → li:nth-of-type(2) <em>Fragile — use only when nothing else works.</em></p><blockquote><em>💡 </em>Higher = more stable. Lower = more fragile.</blockquote><h3>Read Selectors Like Sentences 📖</h3><p>This is the trick that makes selectors stick.</p><p>CSS</p><p>form#login input[type=&#39;email&#39;]</p><p>Read it out loud:</p><blockquote>“In the form with id login, find the input of type email.&quot;</blockquote><p>If it reads clearly ➜ it thinks clearly. ✅</p><h3>The Attribute Superpowers 🎨</h3><p>When elements have no id or class, attributes save the day.</p><p>= → equals exactly Example: [href=&#39;/login&#39;] <em>Matches only </em><em>/login.</em></p><p>*= → contains Example: [href*=&#39;login&#39;] <em>Matches </em><em>/user/login/form.</em></p><p>^= → starts with Example: [href^=&#39;/user&#39;] <em>Matches anything beginning with </em><em>/user.</em></p><p>$= → ends with Example: [href$=&#39;.pdf&#39;] <em>Matches any URL ending in </em><em>.pdf.</em></p><p>Memory trick: * = anywhere • ^ = beginning (like a hat 🎩) • $ = end (like the last dollar 💰)</p><h3>Position Selectors (Use Sparingly) 🎯</h3><p>When nothing else works, position steps in:</p><p>:first-child → the first one :last-child → the last one :nth-of-type(2) → the 2nd of that tag :not(X) → everything except X</p><p>⚠️ <em>Position breaks easily when the page changes. Use only when there’s no better option.</em></p><h3>The 3 Golden Rules ✨</h3><p>🥇 Start with what’s unique Ids first. Attributes next. Position last.</p><p>🥈 Read like a sentence If you can say it in plain English, it’s a good selector.</p><p>🥉 Test in DevTools first</p><ul><li>Open Chrome → press F12</li><li>Click the Elements tab → press Ctrl + F</li><li>Paste your selector</li></ul><p>If it highlights the right element ➜ Selenium will love it too. ✅</p><h3>The Logic Summary in One Picture 🖼️</h3><p>Code</p><p>HTML = 🌳 Family Tree Element = 🏠 A House Selector = 🧭 Directions to That House Step 1 → Find a landmark (unique anchor) Step 2 → Walk inside (space = &quot;inside&quot;) Step 3 → Point exactly (attribute or position)</p><p>That’s the whole map. That’s the whole logic. 🗺️</p><h3>The Mindset That Makes It Stick 🌱</h3><p>You don’t need to remember every symbol.</p><p>You just need to remember this one sentence:</p><blockquote><em>🌟 </em>“Find something unique. Walk toward it. Point to the one I want.”</blockquote><p>That sentence is your cheat sheet. That sentence is your logic. That sentence is your confidence. 💫</p><p>If this helped you, save it, share it, and come back to it whenever HTML feels overwhelming. You’ve got this. 💛</p><p>If you’ve ever felt overwhelmed staring at code, please know — you’re not alone. Every engineer, every tester, every automation pro has stood exactly where you’re standing now.</p><p>The difference between confusion and confidence isn’t talent. It’s just one small shift in how you see the page.</p><p>You’ve got this. And the next element you locate? It’s going to feel effortless. 🌿</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=952764f42f1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>