codeceptjs / codeceptjs/CodeceptJS

CustomLocator plugin takes all selector as key

Abierto
#2,924 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug plugin
Lenguaje dominante
JavaScript
Estrellas
4.2k
Forks
757
Merge medio
2 d 9 h
PR fusionados (30 d)
16

Descripción

#### 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

```js
// 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] 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:

```js
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?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.