Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Shortcut findElements() mechanism for data attributes

未關閉
#39 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
php
領域
testing-qa

研究方向

先檢視 WebDriver 模組的 findElements() 機制,以及 click() 目前如何處理 CSS 選取器。將這條路徑與提議的 data-attribute 簡寫進行比較;當該簡寫能與現有選取器形式並用,且相關行為已由測試涵蓋時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

What are you trying to achieve? (Expected behavior)

A shortcut match() selector for data attributes.

What do you get instead? (Actual behavior)

Need to specify the whole css selector

How could the issue be reproduced? (Steps to reproduce)

Using the example in https://medium.com/swlh/5-tricks-to-elevate-your-automated-regression-tests-762f437c55e6

<a href="/footwear/boots/ankle-boots" data-qaid="shop-ankle-boots">Shop ankle boots</a>

it could be along the lines of:

$i->click(['data' => 'qaid|shop-ankle-boots'])

while today it is:

$i->click(['css' => '[data-qaid="shop-ankle-boots"]']);
Details
  • Codeception version: 3.1.1
主要語言
PHP
星號
39
分支
25
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Codeception/module-webdriver 的其他 Issue

查看 Codeception/module-webdriver 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。