
Explore how to empower existing Playwright and Selenium tests with artificial intelligence and large language models, enabling self-healing locators, visual testing, and smarter API testing while keeping developer control.
Learn how to run a local large language model with Lama on your own machine, avoiding API costs and selecting models with embedding, vision, and tool support.
Choose local AI models by parameter size from 7 billion to 671 billion, considering quantization and head counts, and assess GPU, CPU, and RAM needs for reliable local inference.
Learn to run local llms with Ollama by listing and launching models. Explore small and deep models and generate selenium c sharp code for google.com, offline after download.
Build and use a GUI to run local language models on your machine, using tools like Misty and GPT for all, and generate Playwright C# code from a local model.
Explore the ollama command line interface, using o llama to list, show, and remove models, and view architecture, context length, embedding length, quantization, and prepare for Lang chain usage.
Start Ollama as an API server and query a llama model via its generate endpoint on port 11434; learn to stream responses, use Postman, and review the API docs.
Explore prompt engineering and context engineering, and learn how AI agents and large language models use context to power self-healing test automation, vibe coding, and BDD test cases.
Understand prompt engineering as designing and optimizing prompts to elicit better outputs from generative AI models, including crafting one-shot instructions for AI agents and multi-agent systems.
Discover how context engineering, building on prompt engineering, structures information, system prompts, and tools to guide llms in writing reliable selenium tests and reducing hallucinations for accurate test automation.
Explore prompt engineering with the Claude Sonet model to extract page locators for automated testing, generating json data with locator name, type, and value from login page elements.
Apply context engineering by passing page context to a large language model to extract precise locators, enabling self-correcting ui tests with selenium or playwright.
Explore how ai agents enable large language models to interact with tools and data. Discover MCPs, agent stores, and end-to-end test automation using ai agents for enterprise applications.
Explore how the Playwright MCP server enables browser automation through a client-server setup, configure the MCP server, and use various clients to run tests like login and employee creation.
Master vibe coding to guide AI in creating and refining manual test scenarios for enterprise apps with Playwright MCP server.
Use a test case md file as context to auto-generate a selenium framework in c sharp dotnet, including page object model and configuration files.
Leverage the automated test context to generate bdd test cases and spec-flow driven tests from test case.md, producing feature files for registration and login pages with steps and tags.
Compare AI first and AI assisted testing, weighing costs, maintenance, and dependency on LLMs. Learn how local large language models enable self-healing Selenium tests and secure, private workflows.
Identify the components needed to build self-healing AI test code for test automation and learn to talk with code and language models via HTTP and cloud APIs using prompt engineering.
Explore a traditional selenium test in C# and dotnet with a simple page object model. See how AI self-healing with a large language model adapts locators to prevent failures.
AI-powered self-healing fixes brittle selenium locators with friendly names and resilient async code. It uses a local large language model and configurable models to demonstrate robust test automation.
Learn how to manually extract web element locators by passing page source to a language model, generating id, name, xpath, css, and link text locators in JSON.
Explore building AI-driven, self-healing test automation by integrating prompts, context engineering, and local or cloud llms to generate and update selectors for selenium and playwright tests.
Learn to access local and cloud large language models from test automation by building a C# client and using the HTTP client to call local llama and OpenAI endpoints.
Learn to call a local large language model via Ollama api endpoints from C# .NET, sending an async post with a json body and extracting the model's response for testing.
Learn to access cloud LLMs via OpenAI's API using an HTTP client, including creating an API key, posting a chat completion request to the OpenAI endpoint, and parsing the response.
Demonstrates building C# code to call OpenAI api endpoints, including authentication, configuring messages, and parsing choice content from api responses for cloud llm access.
Read configurations from a json file to replace hardcoded values, creating an lm config with provider, api key, base url, and models, then deserialize and apply it to lm client.
Read the appsettings.json configuration in the bin folder and deserialize it into an LM configuration object using JSON serializer or Microsoft configuration extensions.
Replace hard-coded values with configuration in the LLMClient, centralizing model, temperature, base URL, and API key via LM configuration, and support provider-based switching between OpenAI and local models.
Learn to self-heal brittle Selenium locators by supplying page source and locator data to a large language model to propose alternative locators, with prompt formatting strategies.
Extract locator type and value from POM code using toString in Selenium, obtain page source, and feed it to an LLM to identify alternative locators.
Feed page source and locator context to a large language model to generate alternative locators, returning a structured JSON of id, name, XPath, CSS, and more for self-healing test automation.
Create a json-formatted alternative locator for self-healing by feeding page source, locator type, and original locator to a large language model, returning id, name, xpath, and css selector.
Explore how to build locator strategies for AI-driven test automation and deserialize JSON responses from large language models into a strongly typed locator suggestions class.
Learn to deserialize json responses from large language models into C# classes, using cloud-based models for faster testing, and organize model classes under a models folder.
Deserialize the llm response into a locator strategy, mapping JSON to the suggestions class, exposing XPath, CSS selector, id, and link text, and iterating through alternatives.
Develop a phased locator strategy by applying the page object model, using the find locator method, and iterating with alternative locators and AI healing to ensure reliable UI operations.
Create a self-healing locator class for Selenium WebDriver that uses a primary locator and a current locator strategy to find elements. Build a reusable, library-style approach that handles alternative locators.
Learn to build an alternative locator strategy collection, implement try-find logic using a primary locator, handle no such element exceptions, and prepare for AI healing in test automation.
Explore extending alternative locator strategies with a try-catch flow, leveraging a locator strategies collection and AI healing to fall back when the primary locator fails.
Build an artificial intelligence based auto healing workflow that retrieves a healed locator from a large language model by passing locator type, locator value, and page source.
Learn to convert language model suggestions into locator strategies for xpath, css, id, and name by implementing a try create locator strategy method and wiring it into the locator collection.
Develop an ai-powered healing locator workflow that stores multiple locator strategies, tracks added locators, and discusses a recursion caveat to be resolved next lecture.
Explore implementing self-healing logic for test automation by adding retry attempts and AI healing calls to locate elements, with no such element exception when all attempts fail.
Debug and run tests to see how the ai self-healing locator finds elements, swaps strategies, and performs clicks using async find element, for robust test automation.
Explore building a page object model with a self-healing locator using a C# extension method on IWebDriver. Reuse existing login and home logic with a static web driver extensions class.
Organize the framework folder by adding extensions and models folders, moving namespaces, and aligning with LMS and AI components to support the find element method and self-healing locator.
Explore using the AI find element extension method in test automation, resolve signature conflicts by renaming or adding parameters, and apply awaits to handle asynchronous element resolution.
Update the page object model by converting to AiFindElement code with asynchronous waits and custom extensions for click and send keys, enabling self-healing Selenium automation using LLMs.
Introduction to building an intelligent Playwright automation with a self-healing loop using an LLM, mirroring the Selenium workflow with page object models, locator strategies, AI healing, and minimal code changes.
Demonstrates adapting a page object model for Playwright self-healing tests by replacing IWebDriver with IPage and ILocator, and implementing an AI find element extension for robust locators.
Shows updating the login page locator to use IPage and AI find element with ILocator, switching to async actions (click async, fill async), and renaming extensions to Playwright extensions.
Migrate the self-healing locator to Playwright by switching from I web driver to I page and from I web element to I locator, preserving behavior.
Migrate Selenium logic to Playwright by converting try find with current strategy to use page.locator with async waits, timeout handling, and returning the locator.
Fix the async try alternative strategy in Playwright by passing a locator and strategy name, returning the locator or timeout. Explore AI-assisted healing to adapt selenium strategies to Playwright.
Explore how Playwright locator strategies differ from Selenium, and see css selectors, XPath, text, role, data test id, and placeholder-based selectors, plus a parse locator method returning type and value.
Identify data test id, placeholder, and name attributes to extract locator type and value using a path locator strategy in Playwright, enabling self-healing and robust element selection.
Develop dynamic playwright locators from llm input by removing stale by-type logic, using playwright selectors, and switching on locator types (id, name, class, css, xpath) to form robust self-healing locators.
Refine prompts and context to generate Playwright self-healing locators, detailing formatting, attributes (id, name, aria role, placeholder, text), and switching from Selenium to Playwright models.
Migrate from selenium to Playwright self-healing with LLMs, and build a self-healing test using the page object model in C-sharp dotnet, validating locators as the test runs.
Explore self-healing locators with a persistent local cache for storing original and working locators. Learn how JSON cache reduces LLM calls and speeds test execution in the page object model.
Create a healed locator model and a locator cache to enable persistency in test automation. Store locators in a json file under the bin directory and load them from file.
Learn to store the working locator in the cache using self-healing locators and alternative strategies, including saving the original locator, strategy, and value to JSON and file.
Save healed locators to a json cache file by serializing the cache and writing it to the cache file path, with try-catch error handling and cache initialization.
Load healed locator data from a json cache file to reuse multiple locators for the login page, deserializing a list of healed locators and avoiding new cache creation.
Read cached locators from a JSON file, convert locator type and value into a Selenium by locator, and integrate a self-healing cache workflow with try get healed locator.
Demonstrate running complete code with caching and persistence to speed up test automation. Explore cache-based locators, self-healing strategies, and avoiding repeated LM calls for faster, reliable executions.
Explore visual testing with large language models, using vision models to compare baseline and current screenshots, identify UI changes, and improve cross-browser robustness.
Create a vision client to invoke vision large language models by sending prompts with base64 images to OpenAI or local models, using Selenium-captured screenshots.
Build and integrate a vision comparison workflow using a large language model to compare two base64 images for visual testing, with json deserialization and a reusable lm client pattern.
Explore visual regression testing with Selenium and LLM prompts by capturing screenshots, saving and base64 encoding baseline and current images, and using a vision client to compare them.
Update your app to use the Qwen 3 VL vision model in the cloud, validate a 98% similarity indicating near-identical images, and compare llama, lava, and OpenAI models.
Switch to a GPT-4 mini model with OpenAI vision for reliable image comparison. Resolve deserialization issues and verify differences between two images using the OpenAI API.
Fix deserialization issues from OpenAI responses by cleaning and trimming JSON before deserialization, then use vision models to compare images in tests and flag differences.
Transform Your Test Automation Code (Selenium & Playwright) with AI-Powered Intelligence
This comprehensive course teaches you how to build intelligent, resilient test automation frameworks that leverage local LLMs to reduce maintenance, improve test stability, and accelerate bug detection—all while maintaining complete test integrity.
What You'll Learn:
Foundation & Setup
Install and configure local LLMs using Ollama
Understand prompt engineering, context engineering & model behavior
Master the fundamentals of effective AI communication
Understanding Automation Problems & AI Solutions
Identify common automation pain points
Analyze traditional automation limitations
Learn how AI enables self-healing of locators in Selenium
Master prompting LLMs for alternative locators
Building Foundation - Local & Cloud LLM Communication
Build code to access local LLMs via Ollama API
Build code to access cloud LLMs via OpenAI API
Create centralized configuration to access LLMs
Understand how to extract LocatorType and LocatorValue from Selenium POM
Understand passing PageSource and Locator Context to LLMs
Building Intelligent Locator Strategy for Selenium
Understand deserialization of LLM responses
Implement AI Healing to get alternative locators from LLMs
Build AI Healing for different locator types (XPath, CSS, ID, Name)
Perform AI Healing code within self-healing logic
Building Intelligent Playwright Automation
Implement Self Healing for Playwright
Handle Different Locator Types AI Healing in Playwright
Ensuring existing Selenium Test code logic works for Playwright with POM
Building Visual Testing with Vision LLM Model
Understanding Vision Models and using them for Testing
How to prompt Vision model to get Page comparison
Implementing E2E Vision comparison
By completing this course, you'll master building intelligent test automation frameworks using Selenium and Playwright enhanced with local LLMs through Ollama. You'll confidently implement AI-powered locator strategies that reduce maintenance while preserving test integrity, create self-healing mechanisms with human oversight, and use prompt engineering to generate test scenarios from natural language