Skip to content

Commit

Permalink
Fixed nightwatchjs#267 - getValue command not working
Browse files Browse the repository at this point in the history
  • Loading branch information
beatfactor committed Sep 21, 2014
1 parent 4c756db commit e057fad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/selenium/protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ module.exports = function(Nightwatch) {
Actions.elementIdValue = function(id, value, callback) {
if (arguments.length === 2 && typeof arguments[1] === 'function') {
callback = arguments[1];
return getRequest('/element/' + id + '/value', callback);
return getRequest('/element/' + id + '/attribute/value', callback);
}

if (Array.isArray(value)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/src/commands/testGetValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
var client = this.client.api;

MockServer.addMock({
url : "/wd/hub/session/1352110219202/element/0/value",
url : "/wd/hub/session/1352110219202/element/0/attribute/value",
method:'GET',
response : JSON.stringify({
sessionId: "1352110219202",
Expand Down
2 changes: 1 addition & 1 deletion tests/src/testProtocolActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ module.exports = {
});

test.equal(command.request.method, 'GET');
test.equal(command.request.path, '/wd/hub/session/1352110219202/element/TEST_ELEMENT/value');
test.equal(command.request.path, '/wd/hub/session/1352110219202/element/TEST_ELEMENT/attribute/value');
});
},

Expand Down

0 comments on commit e057fad

Please sign in to comment.