Skip to content

Commit

Permalink
feat: move elem argument first (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart authored Jun 22, 2023
1 parent 9726456 commit 38de7a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/browser/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function sendKeys(action, keys) {
await cmdSendKeys(val);
}

export async function sendKeysElem(action, keys, elem) {
export async function sendKeysElem(elem, action, keys) {
if (elem) {
await focusElem(elem);
}
Expand Down
2 changes: 1 addition & 1 deletion test/browser/commands.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('commands', () => {
});

it('should send keys to element', async() => {
await sendKeysElem('type', 'Hello', elem);
await sendKeysElem(elem, 'type', 'Hello');
expect(elem.value).to.equal('Hello');
});

Expand Down

0 comments on commit 38de7a2

Please sign in to comment.