@dev-blinq/cucumber_client 1.0.1223-dev → 1.0.1224-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1100,6 +1100,7 @@ class BVTRecorder {
1100
1100
  improviseLocators: false,
1101
1101
  mustIncludeCSSChain: true,
1102
1102
  root: commonParent,
1103
+ noCSSId: true,
1103
1104
  });
1104
1105
  locators.forEach((locator) => {
1105
1106
  locator.text = text;
@@ -357,6 +357,7 @@ function generateUniqueCSSSelector(element, options) {
357
357
  const root = options?.root || window.document;
358
358
  const separator = options?.separator || " > ";
359
359
  const isUnique = options?.isunique || ((selector) => getMatchingElements(selector, options).length === 1);
360
+ const noCSSId = options?.noCSSId || false;
360
361
 
361
362
  if (!(element instanceof Element)) return null;
362
363
 
@@ -364,7 +365,7 @@ function generateUniqueCSSSelector(element, options) {
364
365
 
365
366
  let selector = "";
366
367
  const id = element.getAttribute("id");
367
- if (id && !/\d/.test(id)) {
368
+ if (id && !/\d/.test(id) && (!noCSSId)) {
368
369
  selector = "#" + cssEscape(id);
369
370
  if (isUnique(selector)) return selector;
370
371
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1223-dev",
3
+ "version": "1.0.1224-dev",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",