Skip to content

Commit cba2b0e

Browse files
committed
open is treated as an extension command and not a selenium command, Fixes #81
1 parent 1f512bd commit cba2b0e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/selenium-ide/src/ext-command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ ExtCommand.prototype.sendMessage = function(command, target, value, top) {
170170
function isExtCommand(command) {
171171
switch(command) {
172172
case "pause":
173-
//case "open":
173+
case "open":
174174
case "selectFrame":
175175
case "selectWindow":
176176
case "close":

packages/selenium-ide/src/neo/IO/SideeX/playback.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ function executionLoop() {
4747
PlaybackState.setCommandState(id, PlaybackStates.Pending);
4848
if (isExtCommand(command)) {
4949
let upperCase = command.charAt(0).toUpperCase() + command.slice(1);
50-
return (extCommand["do" + upperCase](target, value))
50+
const parsedTarget = command === "open" ? new URL(target, baseUrl).href : target;
51+
return (extCommand["do" + upperCase](parsedTarget, value))
5152
.then(() => {
5253
PlaybackState.setCommandState(id, PlaybackStates.Passed);
5354
return executionLoop();
@@ -212,9 +213,8 @@ function doCommand(res, implicitTime = Date.now(), implicitCount = 0) {
212213
}, 500);
213214
});
214215

215-
const parsedTarget = command === "open" ? new URL(target, baseUrl).href : target;
216216
return p.then(() => (
217-
extCommand.sendMessage(command, xlateArgument(parsedTarget), xlateArgument(value), isWindowMethodCommand(command))
217+
extCommand.sendMessage(command, xlateArgument(target), xlateArgument(value), isWindowMethodCommand(command))
218218
))
219219
.then(function(result) {
220220
if (result.result !== "success") {
@@ -229,7 +229,7 @@ function doCommand(res, implicitTime = Date.now(), implicitCount = 0) {
229229
if (implicitCount == 1) {
230230
implicitTime = Date.now();
231231
}
232-
PlaybackState.setCommandState(id, PlaybackStates.Pending, `Trying to find ${parsedTarget}...`);
232+
PlaybackState.setCommandState(id, PlaybackStates.Pending, `Trying to find ${target}...`);
233233
return doCommand(false, implicitTime, implicitCount);
234234
}
235235
}

0 commit comments

Comments
 (0)