Skip to content

Commit

Permalink
Merge pull request #272 from jdi-testing/issue_265
Browse files Browse the repository at this point in the history
fix equal locators generation
  • Loading branch information
MariiaNebesnova authored Aug 2, 2021
2 parents 9746545 + 191b45b commit d8fa525
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "JDN",
"description": "",
"devtools_page": "index.html",
"version": "3.0.32",
"version": "3.0.33",
"permissions": [
"activeTab",
"tabs",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jdi-react-extension",
"version": "3.0.32",
"version": "3.0.33",
"description": "jdi react extension",
"scripts": {
"start": "npm run webpack",
Expand Down
6 changes: 3 additions & 3 deletions src/js/blocks/autoFind/autoFindProvider/pageObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export const predictedToConvert = (elements) => {
let elementName = getElementName(e);
let elementTagId = e.predictedAttrId;

if (uniqueNames.indexOf(elementName) > 0) elementName += i;
if (elementTagId && uniqueNames.indexOf(elementTagId) > 0) elementTagId += i;
if (uniqueNames.indexOf(elementName) >= 0) elementName += i;
if (elementTagId && uniqueNames.indexOf(elementTagId) >= 0) elementTagId += i;
uniqueNames.push(elementTagId, elementName);

return {
...e,
Locator: e.attrId ? `#${e.attrId}` : e.xpath,
Locator: e.xpath,
Name: elementTagId ? elementTagId : elementName,
Type: getJDILabel(e.predicted_label),
parent: null,
Expand Down

0 comments on commit d8fa525

Please sign in to comment.