Chapter 02 · Prompt Engineering Foundations Track No-code

One structured prompt that generates an enterprise-grade framework, not a toy script.

RICE-POT is the chapter's prompt framework: Role, Instructions, Context, Example, Parameters, Output, Tone. Students use it to make an LLM produce a complete Selenium + TestNG POM framework, a Playwright TypeScript variant, and formal test deliverables, all from a single prompt.

01 What students build

Not an app: a repeatable prompting discipline. The reference build targets the Salesforce login page and forces the LLM into enterprise standards: Page Object Model with PageFactory, TestNG annotations, explicit waits only (no Thread.sleep), XPath-only locators, structured exception handling and an Allure report. The same template is then re-aimed at Playwright TypeScript and at VWO test plan documents.

R · I

Role sets the persona (QA automation tester, 15 years, CRM domain). Instructions carry the [Critical], [Mandatory] and [Don't] rules that make or break the output.

C · E

Context describes the app under test (the Salesforce login page and its fields). Example anchors the style with a small PageFactory snippet the LLM must imitate.

P · O · T

Parameters demand production-level accuracy with zero bad practices. Output lists the exact artifacts (page object, 2 tests, Maven project). Tone keeps it technical and code-only.

02 Architecture

Requirementlogin page AUT
──▶
RICE-POT7-part template
──▶
LLMplan first, then code
──▶
FrameworkPOM + tests + pom.xml
──▶
Reviewstandards checklist
──▶
RunTestNG · Allure
role · instructions · context · example · parameters · output · tone

03 Live demo (simulated with sample data)

This is a UI walkthrough with pre-baked sample data so you can feel the workflow without an API key. In the course you paste the real RICE-POT prompt into your LLM of choice and review what it plans before it writes code.

rice-pot · prompt console demo · sample data

04 Inputs & outputs

What goes in

  • The 7-part RICE-POT prompt template, filled for your app under test
  • [Critical] and [Mandatory] rules: POM + PageFactory, XPath only, no Thread.sleep
  • [Don't] list banning comments, CSS selectors and bad practices
  • A small example snippet the LLM must imitate for style

What comes out

  • A runnable Maven project: page object, BaseTest, valid + invalid TestNG tests
  • Playwright TypeScript variant from the same template
  • Formal test deliverables (test plan, cases) for the VWO project track
  • A step-by-step plan the LLM presents before writing any code

05 How it's built

Learn the anatomy: Role, Instructions, Context, Example, Parameters, Output, Tone, and why each part removes a class of LLM failure.
Write the Role and Context for the Salesforce login page: persona, domain, fields and behaviors of the AUT.
Encode standards as [Critical] / [Mandatory] / [Don't] instruction rules instead of hoping the model behaves.
Anchor style with an Example PageFactory snippet and pin quality with Parameters.
Ask the LLM to plan first and show the file tree, then generate the framework step by step.
Re-aim the identical template at Playwright TypeScript and at VWO test deliverables, plus anti-hallucination rules from the real-project track.

06 Tech stack

RICE-POT promptingSelenium WebDriver · JavaTestNG · MavenPage Object Model · PageFactoryAllure reportsPlaywright · TypeScriptAnti-hallucination rules