Skip to content

Commit 27cfd68

Browse files
committed
checking isTerminal before executeCommand
1 parent 907bd14 commit 27cfd68

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/selenium-ide/src/neo/playback/playback-tree/command-node.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export class CommandNode {
6767
'Max retry limit exceeded. To override it, specify a new limit in the value input field.',
6868
})
6969
}
70+
if (this.isTerminal()) {
71+
return Promise.resolve(
72+
this._executionResult(commandExecutor, { result: 'success' })
73+
)
74+
}
7075
return commandExecutor.beforeCommand(this.command).then(() => {
7176
return this._executeCommand(
7277
commandExecutor,
@@ -107,10 +112,6 @@ export class CommandNode {
107112
throw new Error(`Unknown command ${this.command.command}`)
108113
} else if (this.isControlFlow()) {
109114
return this._evaluate(commandExecutor)
110-
} else if (this.isTerminal()) {
111-
return Promise.resolve({
112-
result: 'success',
113-
})
114115
} else if (
115116
this.isWebDriverCommand(commandExecutor) ||
116117
this.isExtCommand(commandExecutor)

0 commit comments

Comments
 (0)