WebConf Taiwan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 深入淺出 Playwright Agent 代理人模式 - 保哥 Will {%hackmd o8oUosN0QnqMSkF1_6kH7g %} #### 📚 議程介紹 {%preview https://webconf.tw/agenda/2 %} ###### ▼▼▼ 開始筆記 ▼▼▼ ![IMG_2512](https://hackmd.io/_uploads/rJkG9XKM-x.jpg) 三大核心代理人 * 規劃者 * 生成者 * 修復者 ### LLM 幻覺來源 - 兩大主因 - 上下文不足 - 上下文混亂 ### Playwright Agent 1. 會有三份 planner, generator & healer(這些都是 Prompt, 可以自定義,不過現有效果已經表現不錯) * ![image](https://hackmd.io/_uploads/Bkh03XFMbl.png) * healer -> 幫助你修復tesing的issue, bug ->自動調整程式碼 3. 寫出自己測試流程,交給 Playwright Agent, 他就會實際跑過一次,再寫出相應的測試計劃 4. 接著就可以根據生成的測試計劃,再寫出測試。 * AI要可以看得懂你的網頁結構 => 無障礙網頁(ARIA) =>語意化你的html 這樣才能有機會實現 AI 自動化測試。 叫測試人員改規格 不要改code >[name=保哥]勸各位能不寫扣就不要寫扣 你寫不過AI的 叫 AI 寫 -> 重點是如何教會 AI 寫出更好的 code 勸各位以後可以不寫 code 就不要寫 code 了,叫 AI 寫 -> 重點是如何教會 AI 寫出更好的 code 人改過的code可讀性會變差 要堅持技術背景 才能教AI寫code 提升詞可以產出穩定的 code,會比程式碼更有價值 ![image](https://hackmd.io/_uploads/HkHeQ4FMbl.png) ```bash npx playwright init-agents --loop=vscode ``` 以上程式碼會在你的 IDE 產生 MD 檔案,搭配 `npx playwright run-test-mcp-server` 使用開發。 ```bash # Playwright MCP Server npx @playwright/mcp@latest # Playright Test MCP Server npx playwright run-test-mcp-server ``` [簡報連結](https://drive.google.com/file/d/1NxiqmPCeTbs0TsFfGWrjfyK_B0wUt_0O/view?fbclid=IwY2xjawOo5qJleHRuA2FlbQIxMABicmlkETFJYkFSRjdQczJZbXNteVVDc3J0YwZhcHBfaWQQMjIyMDM5MTc4ODIwMDg5MgABHoeJ-C7t86d3yHwgcxpwGVBuL4kSOWmDvInS2ucJBW-bESM80aqs3bMkLg7V_aem_hZBUh5pB9amt2CzsecgT4Q) --- #### 聊天區 好苦惱喔,明天早上 10 點 F 棟和 A 棟的講題都想聽,大家會怎麼選? > 選一間坐著 邊看另外一間的共筆 > (超好笑) >>隔壁聊天室有人示範了XDD > > 聽 A 🤍 是故意的 還是不小心 ![image](https://hackmd.io/_uploads/HyvRYmKG-l.png) overdesign有點多XD 確實 感覺token消耗很兇啊 >分三個agent做 變成溝通都還要重新跑一次產生的過程 **AI是盲人 無障礙很重要**(可以帶回去給前端跟他們說幫忙多處理這件事情了) html結構不要亂包XDD checkbox只是拿來記錄狀態 不是給人點的XDD token是公司出錢的就沒事 自己出錢的就不開心 webconf網頁真的好卡 >我開還好誒 我反而喜歡 css selector那種寫法XD > xpath就不行 XD SPA? 我好奇如果是有 auth 才能使用的服務,這種測試會怎麼做? > 整合測試 先插假資料才給他跑 >> 前後端分離的話可以 mock api > 謝謝 ~~我也要跟pm說想像已經跑成功了~~ 我身為 PM 也很希望我不要做什麼手動測試 有夠累 要稍微注意 vscode 版本有要求 (如果用vscode 的話)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully