<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wei-Wei Wu</title>
    <description>The latest articles on DEV Community by Wei-Wei Wu (@wuweiweiwu).</description>
    <link>https://dev.to/wuweiweiwu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4218743%2Ff24fc2d2-8734-42dd-baa9-5cf659b2f0de.jpg</url>
      <title>DEV Community: Wei-Wei Wu</title>
      <link>https://dev.to/wuweiweiwu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wuweiweiwu"/>
    <language>en</language>
    <item>
      <title>Mobile MCP servers: set up Appium MCP, Maestro MCP and mobile-mcp</title>
      <dc:creator>Wei-Wei Wu</dc:creator>
      <pubDate>Tue, 03 Nov 2026 16:00:00 +0000</pubDate>
      <link>https://dev.to/wuweiweiwu/mobile-mcp-servers-set-up-appium-mcp-maestro-mcp-and-mobile-mcp-40kj</link>
      <guid>https://dev.to/wuweiweiwu/mobile-mcp-servers-set-up-appium-mcp-maestro-mcp-and-mobile-mcp-40kj</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://momentic.ai/blog/mobile-mcp-server-setup" rel="noopener noreferrer"&gt;Momentic blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;mobile-mcp&lt;/strong&gt; lets a coding agent inspect and control a mobile app during a live session. Reach for it when you need to explore the UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Appium MCP&lt;/strong&gt; gives the agent access through an Appium session. Reach for it when your mobile setup already uses Appium drivers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maestro MCP&lt;/strong&gt; lets the agent work with Maestro’s mobile testing tools. Reach for it when you already use Maestro flows.&lt;/li&gt;
&lt;li&gt;All three can help an agent inspect and drive an app, but an MCP session alone does not leave behind a test that runs in CI.&lt;/li&gt;
&lt;li&gt;For a versioned test, use Momentic’s MCP server to write and run YAML tests. Install the mobile skills with &lt;code&gt;npx momentic-mobile skills --yes&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Appium MCP, Maestro MCP and mobile-mcp compared
&lt;/h2&gt;

&lt;p&gt;All three run as local stdio servers that your coding agent starts with one command. They differ in what they drive and what they leave behind.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Server&lt;/th&gt;
&lt;th&gt;Install&lt;/th&gt;
&lt;th&gt;Platforms and targets&lt;/th&gt;
&lt;th&gt;What the agent works with&lt;/th&gt;
&lt;th&gt;Leaves a test behind?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/mobile-next/mobile-mcp" rel="noopener noreferrer"&gt;mobile-mcp&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;npx -y @mobilenext/mobile-mcp@latest&lt;/td&gt;
&lt;td&gt;iOS and Android: simulators, emulators and real devices&lt;/td&gt;
&lt;td&gt;The native accessibility tree, with screenshots and coordinates as a fallback&lt;/td&gt;
&lt;td&gt;No. The session lives in the agent's conversation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/appium/appium-mcp" rel="noopener noreferrer"&gt;Appium MCP&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;npx -y appium-mcp@latest&lt;/td&gt;
&lt;td&gt;Android (UiAutomator2) and iOS (XCUITest): simulators, emulators and real devices&lt;/td&gt;
&lt;td&gt;An Appium session: find elements, tap, type, gestures, screenshots&lt;/td&gt;
&lt;td&gt;It can generate Java/TestNG test code from a description&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.maestro.dev/getting-started/maestro-mcp" rel="noopener noreferrer"&gt;Maestro MCP&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;maestro mcp (needs the Maestro CLI)&lt;/td&gt;
&lt;td&gt;iOS and Android apps, plus web&lt;/td&gt;
&lt;td&gt;Maestro commands, so the agent can write, run and debug flows&lt;/td&gt;
&lt;td&gt;Yes, when the agent saves the flow as a YAML file&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Pick the one that matches the tooling you already run. If your team has Appium capabilities and drivers set up, Appium MCP reuses them. If you write Maestro flows, Maestro MCP lets the agent write more of them. If you want an agent to poke at an app with no framework at all, mobile-mcp has the least setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up mobile-mcp
&lt;/h2&gt;

&lt;p&gt;Boot an iOS simulator (&lt;code&gt;xcrun simctl boot "iPhone 16"&lt;/code&gt;) or start an Android emulator first. The project's installer finds the MCP clients on your machine and configures them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @mobilenext/mobile-mcp@latest &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To configure each client by hand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Claude Code&lt;/span&gt;
claude mcp add mobile-mcp &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; @mobilenext/mobile-mcp@latest

&lt;span class="c"&gt;# Codex&lt;/span&gt;
codex mcp add mobile-mcp npx &lt;span class="s2"&gt;"@mobilenext/mobile-mcp@latest"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Cursor, add the server to &lt;code&gt;~/.cursor/mcp.json&lt;/code&gt; or a project-level &lt;code&gt;.cursor/mcp.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"mobile-mcp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@mobilenext/mobile-mcp@latest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;mobile-mcp drives the app from the native accessibility tree first, so the agent reads element labels instead of spending image tokens on screenshots. It falls back to a screenshot and coordinate taps when an element has no accessible label. It also installs, launches and terminates apps, opens deep links and records the screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up Appium MCP
&lt;/h2&gt;

&lt;p&gt;Appium MCP bundles the UiAutomator2 and XCUITest drivers for local sessions. You still need the platform toolchains: &lt;code&gt;ANDROID_HOME&lt;/code&gt;, Java and the Android SDK tools for Android, and Xcode with an installed simulator for iOS (macOS only).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Claude Code&lt;/span&gt;
claude mcp add appium-mcp &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; appium-mcp@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Cursor, and for other clients that take a JSON config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"appium-mcp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"stdio"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"appium-mcp@latest"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"ANDROID_HOME"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/android/sdk"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"CAPABILITIES_CONFIG"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/your/capabilities.json"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Codex, the same server goes in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mcp_servers&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="n"&gt;appium-mcp&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"npx"&lt;/span&gt;
&lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"appium-mcp@latest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ANDROID_HOME&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"/path/to/android/sdk"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;CAPABILITIES_CONFIG&lt;/code&gt; points at a JSON file of Appium capabilities, such as &lt;code&gt;platformName&lt;/code&gt;, &lt;code&gt;appium:deviceName&lt;/code&gt; and &lt;code&gt;appium:app&lt;/code&gt;. The agent opens a session with &lt;code&gt;appium_session_management&lt;/code&gt;, then uses tools such as &lt;code&gt;appium_find_element&lt;/code&gt;, &lt;code&gt;appium_gesture&lt;/code&gt; and &lt;code&gt;appium_set_value&lt;/code&gt;. For a device farm or CI, pass a &lt;code&gt;remoteServerUrl&lt;/code&gt; and explicit capabilities when the session is created instead of using the local drivers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up Maestro MCP
&lt;/h2&gt;

&lt;p&gt;Install the  &lt;a href="https://docs.maestro.dev/getting-started/installing-maestro" rel="noopener noreferrer"&gt;Maestro CLI&lt;/a&gt;  first. The MCP server is a subcommand of it, so there is no separate package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Claude Code&lt;/span&gt;
claude mcp add maestro &lt;span class="nt"&gt;--&lt;/span&gt; maestro mcp

&lt;span class="c"&gt;# Codex&lt;/span&gt;
codex mcp add maestro &lt;span class="nt"&gt;--&lt;/span&gt; maestro mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or add it to &lt;code&gt;~/.codex/config.toml&lt;/code&gt; by hand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="n"&gt;mcp_servers&lt;/span&gt;&lt;span class="k"&gt;.&lt;/span&gt;&lt;span class="n"&gt;maestro&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"maestro"&lt;/span&gt;
&lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Cursor, merge this into &lt;code&gt;~/.cursor/mcp.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"maestro"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"maestro"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This assumes &lt;code&gt;maestro&lt;/code&gt; is on your &lt;code&gt;PATH&lt;/code&gt;. If the client starts from a minimal shell, use the full path from &lt;code&gt;which maestro&lt;/code&gt;. Maestro MCP is the only one of the three that writes into a test format you already run: when the agent saves its work as a flow file, &lt;code&gt;maestro test&lt;/code&gt; can run it again in CI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where an MCP session stops and a repeatable test starts
&lt;/h2&gt;

&lt;p&gt;A live MCP session can help a coding agent inspect a mobile app and try a user journey, but the session alone does not give CI a test to run. The agent’s observations and next steps remain in its conversation unless the agent writes them into a file. A PR cannot review or rerun a conversation as a test.&lt;/p&gt;

&lt;p&gt;For example, an agent might open an order screen and confirm that the latest order appears. To check that behavior after every change, you need a saved test with an assertion and a repeatable run command. Appium and Maestro can support persistent tests, but access through their MCP servers does not, by itself, save the agent’s exploration as one.&lt;/p&gt;

&lt;p&gt;Momentic’s  &lt;a href="https://momentic.ai/blog/how-to-set-up-momentic-mcp-server" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt;  gives a coding agent a way to write, run, and fix tests while keeping the test definition as YAML in your repository. Install the mobile skills and the MCP server for your agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx momentic-mobile skills &lt;span class="nt"&gt;--yes&lt;/span&gt;
npx momentic-mobile install-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command equips the agent to work on mobile tests. The agent still needs to turn the behavior it explored into a YAML test and run it. Once you commit that file, reviewers can diff the test in a PR, and CI can invoke it without asking the agent to explore the app again. The MCP server handles the agent interaction. The test file and CI invocation make the check repeatable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the resulting test in CI
&lt;/h2&gt;

&lt;p&gt;Run &lt;code&gt;npx momentic-mobile skills --yes&lt;/code&gt; in your project, then use your coding agent and the Momentic MCP server to write and run the mobile test. Review the resulting YAML test and commit it to your repository. CI needs that file, not the agent’s chat history.&lt;/p&gt;

&lt;p&gt;Add a pull-request job that builds the app and runs the committed test with the Momentic CLI. Give the job the credentials and simulator or emulator access it needs, then make the job a required status check so a failed test blocks the merge. The CI job runs the committed tests with &lt;code&gt;npx momentic-mobile run --upload-results&lt;/code&gt;, with &lt;code&gt;MOMENTIC_API_KEY&lt;/code&gt; set as a CI secret. See the  &lt;a href="https://momentic.ai/docs/cli-reference/momentic-mobile/commands/run" rel="noopener noreferrer"&gt;CLI reference&lt;/a&gt;  for device and sharding flags.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How to set up the Momentic MCP server&lt;/li&gt;
&lt;li&gt;Best MCP servers for testing&lt;/li&gt;
&lt;li&gt;Playwright MCP vs. a testing MCP server&lt;/li&gt;
&lt;li&gt;Testing mobile apps in Cursor&lt;/li&gt;
&lt;li&gt;Appium vs. Maestro vs. AI testing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can these servers use physical devices?
&lt;/h3&gt;

&lt;p&gt;Appium can drive physical iOS and Android devices when you configure the appropriate drivers and devices. Maestro supports physical devices as well as simulators and emulators. Check the mobile-mcp project’s README before assuming its server supports your device setup. Momentic’s mobile testing uses simulators and emulators, not physical devices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can one MCP configuration drive both iOS and Android?
&lt;/h3&gt;

&lt;p&gt;You can register one server, but that does not make both platforms ready to use. You still need the devices and platform-specific tooling that the server requires. With Appium, you also need the appropriate driver for each platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  How is Momentic’s MCP server different?
&lt;/h3&gt;

&lt;p&gt;The device-control servers let an agent interact with a running app. Momentic’s MCP server lets an agent write, run, and fix end-to-end tests that remain as YAML files in your repository. The separate npx momentic-mobile skills --yes command installs mobile testing skills. Check the &lt;a href="https://momentic.ai/docs" rel="noopener noreferrer"&gt;Momentic documentation&lt;/a&gt; for the current setup.&lt;/p&gt;

&lt;h3&gt;
  
  
  Must I abandon an existing Appium or Maestro suite?
&lt;/h3&gt;

&lt;p&gt;No. You can keep that suite in CI while adding Momentic tests for behavior you want to cover separately. Do not assume existing test files will run unchanged in Momentic.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>mcp</category>
      <category>mobile</category>
      <category>ai</category>
    </item>
    <item>
      <title>Migrating from Selenium to Playwright: A Step-by-Step Guide</title>
      <dc:creator>Wei-Wei Wu</dc:creator>
      <pubDate>Sat, 31 Oct 2026 09:54:45 +0000</pubDate>
      <link>https://dev.to/wuweiweiwu/migrating-from-selenium-to-playwright-a-step-by-step-guide-2pkj</link>
      <guid>https://dev.to/wuweiweiwu/migrating-from-selenium-to-playwright-a-step-by-step-guide-2pkj</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://momentic.ai/blog/migrate-selenium-playwright" rel="noopener noreferrer"&gt;Momentic blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Migrating from Selenium to Playwright takes 11 steps: audit the framework, pick a language, install Playwright, convert tests, replace wait strategies, rebuild page objects, simplify parallel runs, update CI/CD, migrate gradually, train the team, then adopt advanced features. To skip the rebuild, teams move straight to Momentic, where tests are plain-English YAML that coding agents write and maintain.&lt;/p&gt;

&lt;p&gt;Tired of the constant workarounds needed to make &lt;a href="https://momentic.ai/blog/selenium-future-relevance" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt; work with modern web apps?&lt;/p&gt;

&lt;p&gt;Thinking about all the hours the team could save* if only Selenium did X, Y, or Z better*?&lt;/p&gt;

&lt;p&gt;Congratulations – you’ve reached the point where many engineering teams start to consider migrating from Selenium to Playwright. Here’s what you need to do, the challenges you should anticipate, and some alternative software suggestions.&lt;/p&gt;

&lt;p&gt;One more path exists. Teams that move to Momentic skip the rebuild: tests are version-controlled YAML in your own repository, they self-heal when the UI changes, and Mo, an autonomous AI coworker, explores the app and reports bugs beyond your migrated coverage. The last section covers that option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Migrate from Selenium to Playwright?
&lt;/h2&gt;

&lt;p&gt;Teams migrate because Playwright executes tests faster, waits for elements automatically, handles modern web apps, runs tests in parallel natively, and needs fewer third-party integrations than Selenium.&lt;/p&gt;

&lt;p&gt;In the case of &lt;a href="https://momentic.ai/blog/playwright-vs-selenium" rel="noopener noreferrer"&gt;Playwright and Selenium&lt;/a&gt;, it’s pretty clear that the efficiency gains you’ll get from Playwright far outweigh that risk. Here’s why:&lt;/p&gt;

&lt;h3&gt;
  
  
  Playwright Executes Tests Faster
&lt;/h3&gt;

&lt;p&gt;Playwright runs tests faster thanks to its direct browser communication over WebSockets (no WebDriver layer).&lt;/p&gt;

&lt;h3&gt;
  
  
  Playwright Offers Built-In Auto-Waiting
&lt;/h3&gt;

&lt;p&gt;Playwright automatically waits for elements to be actionable before testing. This means fewer flaky tests and less time spent coding complex workarounds – especially if you’re testing SPAs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Playwright Handles Modern Apps Better
&lt;/h3&gt;

&lt;p&gt;Selenium was released in 2004, Playwright in 2020. This means that Playwright is, naturally, better designed for &lt;a href="https://momentic.ai/blog/browser-testing-tools" rel="noopener noreferrer"&gt;modern testing needs&lt;/a&gt; – as well as SPAs, Playwright deals with shadow DOMs, network interception, and multiple browser contexts better than Selenium.&lt;/p&gt;

&lt;h3&gt;
  
  
  Playwright Offers Native Parallel Support
&lt;/h3&gt;

&lt;p&gt;Playwright supports parallel testing out of the box. This offers a significantly easier and more efficient way of running parallel tests than Selenium, which relies on external tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Playwright Requires Fewer Third-Party Integrations
&lt;/h3&gt;

&lt;p&gt;Playwright has a built-in test runner and reporting features, so you don’t need to rely on third-party tools for test retries, tracing, screenshots, or HTML reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Migrate from Selenium to Playwright In 11 Steps
&lt;/h2&gt;

&lt;p&gt;The migration takes 11 steps, from auditing your Selenium framework to adopting Playwright's advanced features, and most teams run both frameworks in parallel during the switch. The exact process varies between teams based on Selenium setup, and it requires technical know-how.&lt;/p&gt;

&lt;p&gt;If you don’t have this expertise in-house, find a consultant who can advise you on your specific circumstances. A good one is worth the investment.&lt;/p&gt;

&lt;p&gt;Still, it can be pretty useful to get an overview of what you need to do in a Selenium to Playwright migration, and when you need to do it. Here’s an at-a-glance guide for reference:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Audit your Selenium framework&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Boring but necessary&lt;/li&gt;
&lt;li&gt;Review test coverage and other key metrics – where could Playwright improve things?&lt;/li&gt;
&lt;li&gt;Note key requirements for migration – what resources will you need, and when will you need them?&lt;/li&gt;
&lt;li&gt;Discuss process retention – which workflows will you keep? Which will no longer work?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Choose your Playwright language&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Playwright supports JavaScript/Typescript, Python, .NET, and Java&lt;/li&gt;
&lt;li&gt;If you’ve chosen it for language continuity, carry on&lt;/li&gt;
&lt;li&gt;However, you could use this opportunity to migrate from Java to TypeScript for better test maintainability – lots of teams do this&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Install Playwright in your project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This one’s self explanatory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Convert basic tests&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start simple, then work your way through your test suite&lt;/li&gt;
&lt;li&gt;What to be aware of: no WebDriver setup, built-in assertions, no explicit waits&lt;/li&gt;
&lt;li&gt;If you’ve done it right, tests will become shorter and more readable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Replace wait strategies&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Playwright automatically waits for element visibility, stability, enabled state, and network idle&lt;/li&gt;
&lt;li&gt;This significantly reduces flakiness&lt;/li&gt;
&lt;li&gt;Make sure you update migrated tests to benefit from this&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Rebuild Page Objects&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you migrate Selenium to Playwright, your POM becomes cleaner, more asynchronous, and less dependent on driver injection&lt;/li&gt;
&lt;li&gt;Ensure test scripts are set up to enable this&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7. Simplify parallel execution&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bid farewell to Selenium Grid and complex Docker setups&lt;/li&gt;
&lt;li&gt;Playwright offers native parallelization&lt;/li&gt;
&lt;li&gt;To maximize the benefits, simplify your execution strategy and remove unnecessary infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;8. Update CI/CD&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove WebDriver setup, driver binaries, and Grid services&lt;/li&gt;
&lt;li&gt;Ensure that your CI is updated to store the test artifacts Playwright generates (HTML reports, trace viewer, screenshots on failure)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;9. Migrate gradually&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do not try to do everything at once&lt;/li&gt;
&lt;li&gt;Create a priority list for rewriting and migration&lt;/li&gt;
&lt;li&gt;High-priority, high-value tests go first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;10. Train your team&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make time for proper training – this reduces the likelihood of bad habits forming, and ensures you maximize efficiency gains&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Focus training on key Selenium/Playwright differences, including:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Asynch waits&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Locators&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fixtures&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Debugging with Trace Viewer&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;11. Start using Playwright’s advanced features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After migration and training, the efficiency gains really start&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take a look at:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Network interception&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multiple browser contexts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Built-in tracing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;API testing&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Are The Challenges of Migrating from Selenium to Playwright?
&lt;/h2&gt;

&lt;p&gt;The two challenges that stall most migrations are user buy-in and the temporary dual maintenance of both frameworks. Migrating from Selenium can also feel intimidating: for many teams, it is the only test automation tool they have ever used.&lt;/p&gt;

&lt;p&gt;The key is anticipating these challenges and planning how to address them in advance. Consider the following:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. User Buy-In
&lt;/h3&gt;

&lt;p&gt;Migrating from Selenium to Playwright will only work if your users buy into the change, and embrace it. However, people are naturally change-resistant. This creates a dilemma.&lt;/p&gt;

&lt;p&gt;(This doesn’t mean that your team are luddites – just that they’re following a natural ‘if it’s safe, why move’ evolutionary instinct). To alleviate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Communicating the benefits early. Chances are, there’s plenty that your team doesn’t love about Selenium – show them how Playwright fixes that&lt;/li&gt;
&lt;li&gt;Staggering training – a huge info-dump will make things seem insurmountable. Delivering training in bite-sized pieces is more manageable&lt;/li&gt;
&lt;li&gt;Encouragement – there may be setbacks, and things may operate less efficiently as your team gets the hang of a new tool. Reward your team’s commitment and perseverance, show recognition for their efforts, whatever works in your organization&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Temporary Dual Maintenance
&lt;/h3&gt;

&lt;p&gt;You won’t be able to migrate all your tests at once – which means you’ll need to maintain both Selenium and Playwright as you complete the switch. If you don’t organize this properly, things could get pretty chaotic. Make sure to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Be super clear about which tests are migrated, and when they will be migrated&lt;/li&gt;
&lt;li&gt;Check in regularly with stakeholders to avoid misunderstandings&lt;/li&gt;
&lt;li&gt;Run a tight ship, administratively speaking – update key documentation as you go, and maintain a single source of truth throughout the project&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Which tools convert Selenium tests to Playwright?
&lt;/h2&gt;

&lt;p&gt;No tool converts a Selenium suite to Playwright and gives you tests you can trust without a review. The options are a manual rewrite, a coding agent that ports one file at a time, or a move to a test format that an agent writes from the spec instead of from the old code.&lt;/p&gt;

&lt;p&gt;Here is what each option does and where it stops:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Playwright codegen records a new test from a browser session. It does not read Selenium code, so it replaces a Selenium test instead of converting it. Use it when the old test is short and the flow is easy to click through.&lt;/li&gt;
&lt;li&gt;A coding agent (Claude Code, Cursor, Codex, Devin) converts Selenium Java, Python or C# to Playwright TypeScript. It handles the mechanical part well: driver setup, locators, waits and assertions. It still needs a run and a review for every file, because the agent cannot see the app when it writes the code.&lt;/li&gt;
&lt;li&gt;Community scripts on GitHub rewrite the driver API calls with regular expressions. They cover a small part of the WebDriver API, and they do not touch page objects, waits or test data. Treat their output as a starting point, not as a converted test.&lt;/li&gt;
&lt;li&gt;Momentic ships no automatic converter from Selenium. Instead, a coding agent with the Momentic MCP server or the coding agent skills writes the YAML test from the existing spec, then runs it and reads the result.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Momentic path is documented in &lt;a href="https://momentic.ai/docs/get-started/test-portability" rel="noopener noreferrer"&gt;Test portability&lt;/a&gt;. Keep the Selenium suite running, port the highest-value flows first, and delete an old spec only after its replacement passes a few consecutive runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What breaks when you move Selenium tests to Playwright?
&lt;/h2&gt;

&lt;p&gt;Explicit waits, driver management, Selenium Grid and driver-injected page objects break first, because Playwright removes the layer they depend on. Locators, iframes and multi-window flows need a rewrite, not a search and replace.&lt;/p&gt;

&lt;p&gt;Plan for these six breakages before you convert the first file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WebDriverWait and implicit waits. Playwright waits for an element to be attached, visible, stable and enabled before it acts. A ported wait either does nothing or hides a real bug. Delete the wait and let the locator action or the web-first assertion (expect(locator).toBeVisible()) do the work.&lt;/li&gt;
&lt;li&gt;Driver binaries and WebDriverManager. Playwright installs its own browsers with npx playwright install. Every driver download step in CI goes away.&lt;/li&gt;
&lt;li&gt;Selenium Grid and remote WebDriver URLs. Playwright runs tests in parallel with workers on one machine, and across machines with --shard. The Grid hub, the nodes and the Docker files that ran them are no longer needed.&lt;/li&gt;
&lt;li&gt;Page objects that receive a WebDriver in the constructor. Playwright page objects receive a Page, and every method becomes async. A Java suite with synchronous chains needs await on every line in TypeScript.&lt;/li&gt;
&lt;li&gt;switchTo().frame() and switchTo().window(). Playwright uses page.frameLocator() for iframes and a new Page object for each tab or popup. Alerts move from switchTo().alert() to page.on('dialog').&lt;/li&gt;
&lt;li&gt;Cloud grid configuration for BrowserStack or Sauce Labs. Both vendors run Playwright, but with a different connection method (a CDP endpoint, not a WebDriver capability), so the config file changes even when the vendor stays.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Locators do not break, but they cost you the most time. A Selenium suite full of absolute XPath keeps working in Playwright and stays as brittle as before. Convert to getByRole, getByLabel and getByTestId while you port, or the migration moves the maintenance problem without fixing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can a coding agent convert a Selenium suite?
&lt;/h2&gt;

&lt;p&gt;Yes. A coding agent converts Selenium code to Playwright faster than an engineer, and the same agent can write the flow as a Momentic YAML test instead. The difference is what the agent does after it writes the file.&lt;/p&gt;

&lt;p&gt;For a Selenium to Playwright port, give the agent one test file, the page objects it imports, and a prompt like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Convert this Selenium Java test to Playwright TypeScript.
Use getByRole, getByLabel or getByTestId locators. Remove every
explicit wait and use web-first assertions. Keep the test name
and the assertions. Run `npx playwright test &amp;lt;file&amp;gt;` and fix
failures until it passes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent produces a file that compiles. It does not know whether the locator matches the real page until the test runs, so the loop that matters is run, read the failure, correct the code. In practice an engineer still reviews every converted file, because the agent will invent a test ID or drop an assertion it could not map.&lt;/p&gt;

&lt;p&gt;With Momentic the agent skips the Playwright code and writes the test as steps in plain English:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Test&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;checkoutShowsConfirmation&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"https://shop.example.com"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;WebDriverWait&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Duration&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ofSeconds&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;until&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ExpectedConditions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;elementToBeClickable&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;By&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"checkout"&lt;/span&gt;&lt;span class="o"&gt;)))&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;click&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findElement&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;By&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="o"&gt;)).&lt;/span&gt;&lt;span class="na"&gt;sendKeys&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"jeff@example.com"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findElement&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;By&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;cssSelector&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"button[type=submit]"&lt;/span&gt;&lt;span class="o"&gt;)).&lt;/span&gt;&lt;span class="na"&gt;click&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;assertTrue&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findElement&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;By&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"confirmation"&lt;/span&gt;&lt;span class="o"&gt;)).&lt;/span&gt;&lt;span class="na"&gt;isDisplayed&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;fileType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;momentic/test/v2&lt;/span&gt;
&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;checkout-shows-confirmation&lt;/span&gt;
&lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://shop.example.com&lt;/span&gt;
&lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;click&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;jeff@example.com&lt;/span&gt;
      &lt;span class="na"&gt;into&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Email input&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;click&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Place order&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;assert&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;An order confirmation is visible&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The YAML file lives in your repository next to the code. The agent writes it with the &lt;a href="https://momentic.ai/docs/coding-agents/mcp-server" rel="noopener noreferrer"&gt;Momentic MCP server&lt;/a&gt; or the &lt;a href="https://momentic.ai/docs/coding-agents/skills" rel="noopener noreferrer"&gt;coding agent skills&lt;/a&gt;, runs it with npx momentic run, and reads the step that failed, the screenshot and the trace. When the checkout button is renamed later, Momentic re-resolves the element from the step description instead of failing on a selector.&lt;/p&gt;

&lt;h2&gt;
  
  
  How long does a Selenium to Playwright migration take for 500 tests?
&lt;/h2&gt;

&lt;p&gt;Plan 3 to 6 months of one engineer for a manual rewrite of 500 tests, 6 to 10 weeks with a coding agent doing the conversion and an engineer reviewing, and 4 to 8 weeks for an agent-assisted move to Momentic. These are planning figures. Convert your first 20 tests, measure the hours per test, and rescale before you commit a date.&lt;/p&gt;

&lt;p&gt;The figures come from a per-test estimate, and the per-test cost is what changes between the three paths:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Hours per test&lt;/th&gt;
&lt;th&gt;500 tests&lt;/th&gt;
&lt;th&gt;What the engineer does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Manual rewrite in Playwright&lt;/td&gt;
&lt;td&gt;1 to 3&lt;/td&gt;
&lt;td&gt;500 to 1,500 hours&lt;/td&gt;
&lt;td&gt;Reads the Selenium test, writes the Playwright test, rebuilds the page object, debugs the run&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coding agent writes Playwright, engineer reviews&lt;/td&gt;
&lt;td&gt;0.5 to 1&lt;/td&gt;
&lt;td&gt;250 to 500 hours&lt;/td&gt;
&lt;td&gt;Reviews the diff, runs the test, corrects locators the agent guessed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coding agent writes Momentic YAML, engineer reviews&lt;/td&gt;
&lt;td&gt;0.3 to 0.6&lt;/td&gt;
&lt;td&gt;150 to 300 hours&lt;/td&gt;
&lt;td&gt;Reviews the steps against the spec, runs the test, accepts the result&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two costs are not in the table and apply to both Playwright paths: the page objects, which you rebuild once per page and not once per test, and the dual maintenance period, in which every UI change costs a fix in Selenium and a fix in Playwright. With Momentic the second cost falls away for the ported tests, because the test updates when the UI changes and the change is a diff in your repository.&lt;/p&gt;

&lt;p&gt;Cost follows the same shape. At a loaded engineer cost of $100 per hour, the manual rewrite of 500 tests costs $50,000 to $150,000 in engineering time before the suite runs in CI. The agent-assisted paths cost $15,000 to $50,000 in review time plus the tooling. Put your own rate and your measured hours per test in the same formula.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do Selenium Grid parallel runs map to Playwright workers in CI?
&lt;/h2&gt;

&lt;p&gt;A Grid node becomes a Playwright worker, and a Grid with several machines becomes a sharded run. Set workers in playwright.config.ts for one machine, and pass --shard=1/4 on four CI jobs to split the suite across machines.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# .github/workflows/e2e.yml&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;e2e&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;strategy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;matrix&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;shard&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;2&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;3&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;4&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npx playwright install --with-deps&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npx playwright test --shard=${{ matrix.shard }}/4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three rules keep the mapping honest. Tests that shared state on the Grid, such as one login account, fail under workers because each worker runs in its own browser context. Playwright reports arrive per shard, so merge them with npx playwright merge-reports or upload each blob as an artifact. And the retry count in playwright.config.ts replaces the rerun-failed-tests plugin you had in Selenium.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is a Selenium to Playwright migration worth it in 2026?
&lt;/h2&gt;

&lt;p&gt;A Selenium to Playwright migration is worth it in 2026 when the suite is under about 300 tests, the team already writes TypeScript, and Selenium Grid costs more than an engineer-week per quarter to run. Above that size, or when maintenance hours are the real cost, the port only moves the problem, and a move to an agent-maintained format pays back sooner.&lt;/p&gt;

&lt;p&gt;Use this table to make the call. Each row is one input that changes the answer; the last column gives the path that wins on that input alone.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Migrate to Playwright&lt;/th&gt;
&lt;th&gt;Stay on Selenium&lt;/th&gt;
&lt;th&gt;Move to Momentic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Suite size&lt;/td&gt;
&lt;td&gt;Under 300 tests: a port fits in one quarter&lt;/td&gt;
&lt;td&gt;Over 1,000 tests and stable: the rewrite cost is not paid back&lt;/td&gt;
&lt;td&gt;Any size: the agent writes tests from the spec, not from the old code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Java or TypeScript&lt;/td&gt;
&lt;td&gt;TypeScript team: Playwright is the native fit&lt;/td&gt;
&lt;td&gt;Java team with no plan to change: Selenium keeps the language&lt;/td&gt;
&lt;td&gt;Either: the test is YAML, and the agent works in both repos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grid cost&lt;/td&gt;
&lt;td&gt;You run your own Grid: Playwright workers and --shard remove the hub and nodes&lt;/td&gt;
&lt;td&gt;You already pay a cloud grid that runs Selenium well&lt;/td&gt;
&lt;td&gt;Momentic runs the browsers, so the Grid line item goes away&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maintenance hours&lt;/td&gt;
&lt;td&gt;Under 10 hours a week: auto-waiting cuts the flaky share&lt;/td&gt;
&lt;td&gt;Under 5 hours a week: no reason to move&lt;/td&gt;
&lt;td&gt;Over 10 hours a week: tests re-resolve elements when the UI changes, so the hours drop&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Add up the rows. Two or more rows in the Playwright column make the port worth it. Two or more rows in the Momentic column mean the port is a detour: you pay for a rewrite and keep the maintenance bill.&lt;/p&gt;

&lt;p&gt;Yes for speed, no for maintenance. Software testing is faster, simpler, and easier to scale with Playwright, but you still own a code-based suite. If you plan your migration properly, you are likely to start realizing those efficiency gains relatively soon after implementing.&lt;/p&gt;

&lt;p&gt;On the other hand, Playwright is no longer the* creme de la creme *of software testing tools. You’re still anchored to writing tests in code, and auto-waits don’t solve your ongoing test maintenance burden. If you’re looking to shift left and up your release cadence (and in this environment, you need to), Playwright will only get you halfway there.&lt;/p&gt;

&lt;p&gt;Momentic removes the two costs that Playwright keeps: writing the test in code, and fixing it when the UI changes. It does this with functionality that Playwright does not offer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Natural language test creation:&lt;/strong&gt; create tests in plain English – it takes seconds, and makes it much easier for your engineers to test as they go and avoid huge find-and-fix bottlenecks just before code is shipped&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version-controlled YAML:&lt;/strong&gt; tests live in your own repository as plain English, so engineers and coding agents can read, diff, and maintain them like source code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intent-based locators:&lt;/strong&gt; these update your test when the UI changes – &lt;a href="https://momentic.ai/blog/self-healing-test-automation-guide" rel="noopener noreferrer"&gt;tests self-heal&lt;/a&gt;, minimizing your test maintenance burden and freeing up engineering hours for other, more valuable tasks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI agents:&lt;/strong&gt; Mo, your autonomous AI coworker, explores your app, evaluates critical user flows, generates new tests, and reports the bugs it finds. Routine maintenance runs in the background&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you migrate from Selenium to Playwright now, chances are you’ll need to migrate again in a couple of years when you realize that AI offers steeper efficiency gains.&lt;/p&gt;

&lt;p&gt;Why waste effort migrating to a &lt;a href="https://momentic.ai/blog/playwright-alternatives" rel="noopener noreferrer"&gt;system that’s on its way out&lt;/a&gt;? Migrate straight from Selenium to an AI-native testing tool to really see the difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migrate to Momentic
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;We went from 1-2 months for 80% user flow coverage to 1-2 days.&lt;/p&gt;

&lt;p&gt;— Aditya Advani, Best Parents&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://momentic.ai/" rel="noopener noreferrer"&gt;Momentic&lt;/a&gt; is an AI testing solution that’s designed to be intelligent, intuitive, and fast. Implement on Day 1, test on Day 1.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://momentic.ai/customers/best-parents" rel="noopener noreferrer"&gt;Here’s how Best Parents reached 80% user flow coverage&lt;/a&gt; in just one day after implementing Momentic – &lt;em&gt;with tests written in plain English&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Want to join them? &lt;a href="https://momentic.ai/sales" rel="noopener noreferrer"&gt;Talk to our engineering team today&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I migrate a Selenium suite to Playwright?
&lt;/h3&gt;

&lt;p&gt;Audit your Selenium framework, choose a language, install Playwright, convert basic tests, replace wait strategies, rebuild page objects, simplify parallel execution, update CI/CD, migrate gradually, train your team, then adopt advanced features like tracing and network interception.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is there a tool that converts Selenium tests to Playwright?
&lt;/h3&gt;

&lt;p&gt;No tool reliably converts Selenium tests to Playwright, so teams rewrite them by hand or have a coding agent port them. Another path is Momentic, where tests are plain-English YAML that self-heal when the UI changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  What breaks when you move Selenium tests to Playwright?
&lt;/h3&gt;

&lt;p&gt;Explicit waits break because Playwright auto-waits for actionable elements. WebDriver setup and Selenium Grid are no longer needed. Page objects must be rebuilt for async locators, and CI must store Playwright's trace and screenshot artifacts.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long does a Selenium to Playwright migration take for 500 tests?
&lt;/h3&gt;

&lt;p&gt;Plan 3 to 6 months of one engineer for a manual rewrite of 500 tests, 6 to 10 weeks with a coding agent converting and an engineer reviewing, and 4 to 8 weeks for an agent-assisted move to Momentic. Convert 20 tests first and rescale from the measured hours per test.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is a Selenium to Playwright migration worth it in 2026?
&lt;/h3&gt;

&lt;p&gt;Yes when the suite is under about 300 tests, the team writes TypeScript, and you run your own Selenium Grid. No when maintenance hours are the main cost: the port keeps a code-based suite, so move to tests that an agent writes and maintains instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can a coding agent convert our Selenium suite for us?
&lt;/h3&gt;

&lt;p&gt;Yes. Claude Code, Cursor, Codex or Devin convert Selenium Java or Python to Playwright TypeScript one file at a time, and an engineer reviews and runs each file. The same agent can write the flow as a Momentic YAML test with the Momentic MCP server, then run it and read the failure.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>playwright</category>
      <category>selenium</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Using Cursor for UI Testing: How Much Can AI Actually Automate?</title>
      <dc:creator>Wei-Wei Wu</dc:creator>
      <pubDate>Sat, 31 Oct 2026 09:54:42 +0000</pubDate>
      <link>https://dev.to/wuweiweiwu/using-cursor-for-ui-testing-how-much-can-ai-actually-automate-4d2c</link>
      <guid>https://dev.to/wuweiweiwu/using-cursor-for-ui-testing-how-much-can-ai-actually-automate-4d2c</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://momentic.ai/blog/cursor-ui-testing-guide" rel="noopener noreferrer"&gt;Momentic blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Yes, Cursor can write and edit UI tests. It drafts Playwright or Cypress tests from a user story, writes page objects and mocks, and fixes broken selectors when you ask. Its agent can also drive a browser to click through your running app, but it does not keep those checks as tests that run again in CI. Connect it to a test runner, such as the Momentic MCP server, to close that gap.&lt;/p&gt;

&lt;p&gt;Can you use AI code generation tools like Cursor for UI testing? TL;DR yes, with some caveats. They accelerate test creation and maintenance without offering some of the steepest efficiency gains agentic AI tools offer.&lt;/p&gt;

&lt;p&gt;Depending on your requirements, this is no bad thing. But it’s important to understand what Cursor does well and what its limitations are before building an entire &lt;a href="https://momentic.ai/blog/enterprise-testing-strategy-guide" rel="noopener noreferrer"&gt;testing strategy&lt;/a&gt; around it. It will suit teams looking for an AI solution that sits on top of their existing framework and takes some of the grunt work out of your existing processes. It won’t suit those looking to do away with slow, cumbersome frameworks entirely.&lt;/p&gt;

&lt;p&gt;Here’s how Cursor accelerates testing, what it won’t help you with, and what your alternatives are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cursor for UI Testing: What It Does Well
&lt;/h2&gt;

&lt;p&gt;Cursor does four UI testing jobs well: it drafts test cases from a user story, writes Playwright or Cypress code, edits broken selectors on request, and generates mocks and test data.&lt;/p&gt;

&lt;p&gt;If you’re looking for an AI testing tool that will shave some time off established processes, Cursor offers plenty to like. This makes it ideal for teams in that ‘in-between’ stage, if you’re using it as a coding agent and aren’t quite ready to add another tool to your stack, using Cursor for UI testing can help accelerate release cycles.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test Creation With AI
&lt;/h3&gt;

&lt;p&gt;One of the major pain points of traditional test automation frameworks is the effort required to create tests in the first place. If, as many modern organizations do, your engineers test code themselves without external QA handoff, this significantly eats into time spent on ideation and feature development.&lt;/p&gt;

&lt;p&gt;Using &lt;a href="https://momentic.ai/blog/libraries-and-heartbreak" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt; for UI testing allows you to significantly reduce time spent on authoring tests in two key ways:&lt;/p&gt;

&lt;h3&gt;
  
  
  Generating Test Cases From Requirements
&lt;/h3&gt;

&lt;p&gt;Paste a user story and let Cursor generate the set of tests required to validate it. Cursor’s AI is relatively intelligent when it comes to what to test, as well as obvious happy-path tests, it can suggest edge cases, error scenarios, and accessibility checks to incorporate into your test suite.&lt;/p&gt;

&lt;h3&gt;
  
  
  Writing Playwright/Cypress code
&lt;/h3&gt;

&lt;p&gt;This is where Cursor offers the strongest efficiency gains. Cursor can generate code for &lt;a href="https://momentic.ai/blog/selenium-vs-playwright" rel="noopener noreferrer"&gt;Playwright, Selenium, and other traditional frameworks&lt;/a&gt; that’s complex enough to include&lt;/p&gt;

&lt;p&gt;page objects, selectors, test setup, assertions, and mock APIs.&lt;/p&gt;

&lt;p&gt;It’s good enough to understand large, complex codebases (including React components, Next.js pages, and API routes) and to generate tests that actually match your implementation, rather than generic templates or examples.&lt;/p&gt;

&lt;p&gt;It’s not perfect 100% of the time, but it gets you much closer than starting from scratch. Cursor code generation plus human review is far quicker than getting humans to code everything from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI-Assisted Test Maintenance
&lt;/h3&gt;

&lt;p&gt;Using traditional frameworks, maintaining UI tests is often more expensive than writing new ones, in terms of engineering hours. As a result, teams either dedicate huge amounts of time to &lt;a href="https://momentic.ai/blog/how-self-healing-test-automation-reduces-maintenance" rel="noopener noreferrer"&gt;test maintenance&lt;/a&gt; (to keep test suites compact) or simply write new tests whenever needed, causing unnecessary bloat. Neither option is ideal.&lt;/p&gt;

&lt;p&gt;Using Cursor for UI testing significantly reduces the time needed to maintain your tests. With the right prompt, Cursor’s AI can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Refactor selectors&lt;/li&gt;
&lt;li&gt;Update page objects&lt;/li&gt;
&lt;li&gt;Fix broken locators&lt;/li&gt;
&lt;li&gt;Rename methods&lt;/li&gt;
&lt;li&gt;Convert old patterns to new ones&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you’re shipping multiple minor UI updates per week, this is a particularly useful tool to have on hand.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generating Mocks and Test Data
&lt;/h3&gt;

&lt;p&gt;Cursor is very effective at creating mock API responses, fixtures, factories, seed data, and edge-case datasets. This saves a significant amount of repetitive manual work for your team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Cursor for UI Testing Falls Short
&lt;/h2&gt;

&lt;p&gt;Cursor falls short in four places: dynamic UI behavior, assertions about business outcomes, selector stability, and turning browser exploration into repeatable tests.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cursor Often Misunderstands Dynamic UI Behavior
&lt;/h3&gt;

&lt;p&gt;This is a major point for teams using Cursor for UI testing. Dynamic behavior is common in modern web and mobile apps, and Cursor often misreads state transitions, real-time updates and other dynamic behavior. That makes it an incomplete solution on its own.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cursor Struggles to Find the Right Assertions
&lt;/h3&gt;

&lt;p&gt;Cursor’s AI will typically test “does the button exist?” over “was the order successfully submitted?” Generally, it lacks the domain knowledge to test business-critical assertions. This risks leaving important issues untested while giving the impression of broader coverage. Superficially scaling test coverage is easy with Cursor, but ensuring that coverage is meaningful takes significantly more effort.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cursor Generates Tests With Unstable Selectors
&lt;/h3&gt;

&lt;p&gt;On the one hand, using Cursor for UI testing helps accelerate test maintenance. On the other hand, teams report that Cursor-generated tests add to that burden by generating brittle selectors that increase flakiness.&lt;/p&gt;

&lt;p&gt;So, you maintain tests quicker, but &lt;a href="https://momentic.ai/blog/test-coverage-vs-code-coverage" rel="noopener noreferrer"&gt;generate more tests&lt;/a&gt; for which maintenance is required, and in-depth human review is still needed to ensure locator quality. Your net time spent on maintenance is still likely to decrease, but those efficiency gains are hampered significantly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cursor Can Explore Your App, but It Does Not Keep What It Finds
&lt;/h3&gt;

&lt;p&gt;Cursor’s agent can now control a browser. Its docs describe navigating, clicking, typing, taking screenshots, and reading console logs and network traffic to test an app. That is useful for checking a change while you build it. But Cursor is still a coding agent, not an &lt;a href="https://momentic.ai/blog/agentic-testing-guide" rel="noopener noreferrer"&gt;agentic testing solution&lt;/a&gt;. A browser session in chat is not a saved test that runs again in CI, and browser actions need your approval by default.&lt;/p&gt;

&lt;p&gt;For example, Cursor can click through a checkout flow and report what it saw, but that check ends with the chat. To keep the coverage, you still turn it into framework code and maintain its selectors. What it explores, and which coverage gaps it finds, still depend on what you ask it to look at.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cursor for UI Testing: An Example Workflow
&lt;/h2&gt;

&lt;p&gt;A practical Cursor workflow splits the work: a person sets the test strategy and reviews the assertions, Cursor writes the skeletons and boilerplate, CI runs the tests, and Cursor helps fix the failures.&lt;/p&gt;

&lt;p&gt;Can you use Cursor for UI testing effectively? Absolutely, if you understand what it can and cannot do, and build your workflows around that.&lt;/p&gt;

&lt;p&gt;Assuming that Cursor can take care of absolutely everything will result in disappointment. Seeing Cursor as a tool that accelerates code creation, with humans still entirely responsible for code quality, is a much more effective way of structuring things. A template workflow might look a little something like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Human defines test strategy&lt;/li&gt;
&lt;li&gt;AI generates test skeletons&lt;/li&gt;
&lt;li&gt;Human reviews assertions&lt;/li&gt;
&lt;li&gt;AI writes boilerplate&lt;/li&gt;
&lt;li&gt;CI executes tests&lt;/li&gt;
&lt;li&gt;AI helps fix failures&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Cursor Alternatives: AI-Native Testing Solutions
&lt;/h2&gt;

&lt;p&gt;The alternative to Cursor-written framework code is a testing tool that Cursor can drive. With Momentic, Cursor writes the test as plain-English steps, runs it, reads the failed step, screenshot and trace, and corrects its own code.&lt;/p&gt;

&lt;p&gt;Rather than simply accelerating your existing processes, &lt;a href="https://momentic.ai/" rel="noopener noreferrer"&gt;AI-native testing solutions&lt;/a&gt; add a whole new dimension to your strategy. Intelligent, agentic solutions move beyond code creation and maintenance on demand to a more intelligent approach.&lt;/p&gt;

&lt;p&gt;An agentic tool runs the app while it tests. It can explore a stated area, report what failed with a screenshot and a trace, and point a person at the step that broke. You still decide what to test and review each change.&lt;/p&gt;

&lt;p&gt;Momentic steps target an element by its description, not by a CSS selector. When a saved locator stops matching the page, Momentic finds the element again from that description. Cursor fixes a broken selector when you ask it to. Momentic re-resolves the element during the run, and you review the result in the run viewer.&lt;/p&gt;

&lt;p&gt;This moves part of the maintenance work from your engineers to the test runner. With more AI-generated code to verify, that time adds up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does It Need to Be One or the Other?
&lt;/h3&gt;

&lt;p&gt;Not necessarily. You can combine the flexibility of custom code with the exploratory capabilities of &lt;a href="https://momentic.ai/blog/set-theory-of-agentic-testing" rel="noopener noreferrer"&gt;agentic AI&lt;/a&gt; by building critical paths in Playwright (with code generated and maintained by Cursor) while using AI testing solutions for broader regression and exploratory coverage.&lt;/p&gt;

&lt;p&gt;This gives you the visibility of code where you need it, while significantly reducing the engineering hours needed to keep large UI suites running.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do I connect Cursor to a test runner?
&lt;/h2&gt;

&lt;p&gt;Install the Momentic MCP server and the Momentic skills in your project. The MCP server gives Cursor a live browser and tools to run, edit and triage tests. The skills tell Cursor which tools to call and in what order. See the &lt;a href="https://momentic.ai/docs/coding-agents/mcp-server" rel="noopener noreferrer"&gt;MCP guide&lt;/a&gt; and the &lt;a href="https://momentic.ai/docs/coding-agents/skills" rel="noopener noreferrer"&gt;skills guide&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx momentic install-mcp &lt;span class="nt"&gt;--client&lt;/span&gt; cursor &lt;span class="nt"&gt;--scope&lt;/span&gt; project
npx momentic skills &lt;span class="nt"&gt;--target&lt;/span&gt; cursor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first command writes the server entry to .cursor/mcp.json. The second installs the skills in .cursor/skills/ and adds a pointer in .cursor/rules/momentic-skills.mdc. Restart Cursor, start a new chat, and ask which momentic_ tools are available.&lt;/p&gt;

&lt;p&gt;Then the agent loop has four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cursor writes and runs a test with the Momentic CLI or the Momentic MCP server.&lt;/li&gt;
&lt;li&gt;The run returns a structured failure: the step that failed, a screenshot and a trace.&lt;/li&gt;
&lt;li&gt;Cursor reads that result and corrects its own code, then runs the test again.&lt;/li&gt;
&lt;li&gt;Momentic maintains the test when the UI changes, and you review the change.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Can Cursor update my end-to-end tests when I change a component?
&lt;/h2&gt;

&lt;p&gt;Yes, if the tests are files in your repository. Ask Cursor to run the affected tests after it changes the component, and to update a test only when the expected behavior changed. Review the test diff with the code diff in the same pull request.&lt;/p&gt;

&lt;p&gt;A test that targets a CSS class breaks when Cursor renames that class. A Momentic step describes the element instead, for example "the Submit order button". When the saved locator stops matching, Momentic finds the element again from the description for that run, so a markup change does not fail the test.&lt;/p&gt;

&lt;p&gt;This also stops Cursor from writing brittle selectors, because the test holds no selector. See &lt;a href="https://momentic.ai/docs/reliability/auto-maintenance" rel="noopener noreferrer"&gt;locator auto-healing&lt;/a&gt; for how the re-resolution works.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Testing Tools vs Cursor for UI Testing: At-A-Glance Comparison
&lt;/h2&gt;

&lt;p&gt;The table compares Cursor-written framework tests with an AI-native testing tool on purpose, authoring, maintenance and exploration.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Cursor for UI Testing&lt;/th&gt;
&lt;th&gt;AI-native testing tools (for example, Momentic)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Primary Purpose&lt;/td&gt;
&lt;td&gt;AI-powered code generation and test maintenance on top of existing frameworks&lt;/td&gt;
&lt;td&gt;Tests written as plain-English steps, run in a real browser, with failure evidence a coding agent can read&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best Fit&lt;/td&gt;
&lt;td&gt;Teams that want to accelerate existing Playwright/Cypress workflows without changing their testing stack&lt;/td&gt;
&lt;td&gt;Teams that want a coding agent to write, run and correct end-to-end tests in the repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test Creation&lt;/td&gt;
&lt;td&gt;Generates test cases from requirements and user stories, including happy paths, edge cases, error scenarios, and accessibility checks&lt;/td&gt;
&lt;td&gt;Plain-English steps in YAML files, written by an engineer or by Cursor through the Momentic MCP server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test Maintenance&lt;/td&gt;
&lt;td&gt;Assists with refactoring selectors, updating page objects, fixing locators, renaming methods, and modernizing patterns when prompted&lt;/td&gt;
&lt;td&gt;Finds an element again from the step description when a saved locator stops matching; you review the result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;App Exploration&lt;/td&gt;
&lt;td&gt;The agent can click through the app in a browser, with each action approved by default, but sessions are not saved as repeatable tests&lt;/td&gt;
&lt;td&gt;Mo explores a running app from an objective and files bugs with recordings and reproduction steps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Level of Autonomy&lt;/td&gt;
&lt;td&gt;Human-driven; heavily dependent on prompts, review, and oversight.&lt;/td&gt;
&lt;td&gt;The agent runs tests and reads the failed step, screenshot and trace; people review the diff&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Testing Approach&lt;/td&gt;
&lt;td&gt;Reactive and code-centric: humans define strategy, AI accelerates implementation&lt;/td&gt;
&lt;td&gt;Tests live in your repository and run from the CLI in CI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Final Thoughts: Will Cursor For UI Testing Be Enough?
&lt;/h2&gt;

&lt;p&gt;Cursor is enough when you keep Playwright or Cypress and review every generated test yourself. When you want Cursor to run the tests and act on the failures, give it a test runner it can call.&lt;/p&gt;

&lt;p&gt;If you’re using it for code generation already, using Cursor for UI testing will give you some quick wins, coverage, and maintenance-wise. It won’t let you integrate AI with your testing processes to its full potential, however.&lt;/p&gt;

&lt;p&gt;An agentic tool adds what Cursor does not have: a test runner that the agent can call, failure evidence it can read, and tests saved from exploring the running app.&lt;/p&gt;

&lt;p&gt;To keep the flexibility of custom code, opt for Playwright and Cursor as a combination. To level up your testing processes and really accelerate your release cycles, choose a tool like Momentic, or a hybrid approach of the two.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We needed a way to own testing in-house without allocating too much engineering time toward addressing flakes. Momentic gave us that perfect blend of ownership, reliability, and flexibility.&lt;/p&gt;

&lt;p&gt;— Aniruddha Laud, Head of Engineering, Pocus&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://momentic.ai/customers/pocus" rel="noopener noreferrer"&gt;How Pocus reduced flaky tests by a factor of 20 and now validates 100% of production deployments with Momentic&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can Cursor be used for UI testing?
&lt;/h3&gt;

&lt;p&gt;Yes. Cursor writes and edits Playwright, Cypress and Selenium tests from a prompt or a user story. Its agent can click through your app in a browser, but it does not keep those checks as tests, so an engineer or a connected test runner must run each test and check what it asserts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which test tools work with Cursor?
&lt;/h3&gt;

&lt;p&gt;Any framework whose tests are code files, such as Playwright, Cypress and Selenium. Momentic also works with Cursor through its MCP server: run npx momentic install-mcp --client cursor, and Cursor can write, run and triage Momentic tests from chat.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I add a testing skill to Cursor?
&lt;/h3&gt;

&lt;p&gt;Run npx momentic skills --target cursor in your repository. It installs the Momentic skills in .cursor/skills/ and adds a pointer in .cursor/rules/momentic-skills.mdc, so Cursor knows which test tools to call and in what order.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Cursor update my end-to-end tests when I change a component?
&lt;/h3&gt;

&lt;p&gt;Yes, if the tests live in your repository. Ask Cursor to run the affected tests after the change and to edit a test only when the expected behavior changed. Review the test diff with the code diff.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I stop Cursor from writing brittle selectors?
&lt;/h3&gt;

&lt;p&gt;Write tests that hold no selector. A Momentic step describes the element in plain English, and Momentic finds the element again from that description when the saved locator stops matching. In Playwright, ask Cursor for role-based or test-id locators.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Cursor fix a failing test on its own?
&lt;/h3&gt;

&lt;p&gt;Only with the failure in front of it. Connected to the Momentic MCP server, Cursor runs the test, reads the failed step, screenshot and trace, and corrects its code. You review the diff before merge.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>cursor</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
