CustomLocator plugin takes all selector as key
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- testing-qa
Research direction
Reproduce the two I.click examples from the issue with the customLocator plugin enabled. Trace the plugin's selector handling, then add regression coverage for a custom locator followed by a CSS suffix; done means the suffix is preserved and the resulting element can be clicked.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- JavaScript
- Stars
- 4.2k
- Forks
- 756
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codeceptjs/CodeceptJS
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
codeceptjs/CodeceptJS#5420 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codeceptjs/CodeceptJS#5358 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
codeceptjs/CodeceptJS#4958 · 10 comments · 2 reactions ·
-
stale
Difficulty 1/5 Under an hour Newbie friendliness 72/100
codeceptjs/CodeceptJS#4778 · 3 comments ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 38/100
codeceptjs/CodeceptJS#5618 · 1 comment ·
All issues in codeceptjs/CodeceptJS
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100