CustomLocator plugin takes all selector as key

オープン
#2,924 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js
領域
testing-qa

調査の方向性

customLocatorプラグインを有効にして、issueにある2つのI.clickの例を再現します。プラグインのセレクター処理を追跡し、カスタムロケーターの後にCSSサフィックスが続くケースのリグレッションテストを追加します。サフィックスが保持され、結果の要素をクリックできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug plugin
What are you trying to achieve?

I'd like to use a custom locator and a suffix css selector

What do you get instead?

Instead of concatening the custom locator and the end of the css selector, I've got a full length of customLocator

Provide test source code if related

// What I want to achieve:
 I.click('[data-testid=register_button] option:first-child()');
// ==> gives OK

// When using the custom locator:
 I.click('$register_button option:first-child()');
// ==> gives     [1] <pause> Error | Error: Clickable element ".//*[@data-testid='register_button option:first-child()']" was not found by text|CSS|XPath
Details
  • CodeceptJS version: 3.0.5
  • NodeJS Version: 14.16
  • Operating System: Linux
  • Configuration file:
plugins: {
        allure: {},
        pauseOnFail: {},
        customLocator: {
            enabled: true,
            attribute: 'data-testid',
            showActual: true,
        },
    },

Would it be possible to add a new option like 'final delimiter'? (space by default) It would truncate the locator to be used?

主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。