Skip to content

Commit

Permalink
Merge branch 'master' into issue_259
Browse files Browse the repository at this point in the history
  • Loading branch information
MariiaNebesnova committed Aug 2, 2021
2 parents 12e1a5a + d8fa525 commit 4730ecc
Showing 1 changed file with 3 additions and 3 deletions.
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 4730ecc

Please sign in to comment.