Skip to content

Commit

Permalink
feat: next locator
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuineng committed Nov 24, 2023
1 parent 2e26538 commit fe43ca1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/next/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = wd => {
[
'page',
'pagePopup',
'locator',
'browser',
'browserType',
].forEach(method => {
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": "macaca-wd",
"version": "4.3.3",
"version": "4.3.4",
"description": "Macaca webdirver API for Node.js",
"keywords": [
"macaca",
Expand Down
17 changes: 17 additions & 0 deletions test/utility.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,23 @@ describe('test/utility.test.js', function() {
});
});
});

/**
* https://macacajs.github.io/macaca-wd/#locator
*/
describe('locator', async () => {
it('should work', async () => {
await driver.locator('');
assert.equal(server.ctx.url, '/wd/hub/session/sessionId/next');
assert.equal(server.ctx.method, 'POST');
assert.deepEqual(server.ctx.response.body, {
sessionId: 'sessionId',
status: 0,
value: '',
});
});
});

/**
* https://macacajs.github.io/macaca-wd/#pageIframe
*/
Expand Down

0 comments on commit fe43ca1

Please sign in to comment.