Skip to content

Commit 022d1f2

Browse files
committed
Code review changes
1 parent 64655a3 commit 022d1f2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/commands/element.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ export async function findElOrEls(
3333
? JSON.parse(selector)
3434
: selector; // Special case
3535

36+
// If user is looking for Native IOS/Mac locator
3637
if (
37-
proxyDriver instanceof AndroidUiautomator2Driver ||
38-
proxyDriver instanceof XCUITestDriver
38+
!isFlutterLocator &&
39+
(proxyDriver instanceof XCUITestDriver ||
40+
proxyDriver instanceof Mac2Driver)
3941
) {
40-
return { strategy, selector, context };
41-
} else if (isFlutterLocator) {
42-
return { using: strategy, selector: selector, context };
43-
} else {
4442
return { using: strategy, value: parsedSelector, context };
43+
} else {
44+
return { strategy, selector: parsedSelector, context };
4545
}
4646
}
4747

test/unit/element.specs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ describe('Element Interaction Functions', () => {
156156
expect(
157157
mockDriver.command.calledWith('/element', 'POST', {
158158
strategy: 'strategy',
159-
selector: 'selector',
159+
value: 'selector',
160160
context: 'context',
161161
}),
162162
).to.be.true;

0 commit comments

Comments
 (0)