codeceptjs / codeceptjs/CodeceptJS

CustomLocator plugin takes all selector as key

Đang mở
#2,924 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug plugin
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.