Skip to content

Commit 06c855c

Browse files
authored
Merge pull request #596 from Jongkeun/improving-executeCommand
checking isDisabled before executeCommand
2 parents 98a838f + ccce45e commit 06c855c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,26 @@ export class CommandNode {
5555
isTerminal() {
5656
return (
5757
ControlFlowCommandChecks.isTerminal(this.command) ||
58-
this.command.command === '' ||
59-
this.command.command.startsWith('//')
58+
this.command.command === ''
6059
)
6160
}
6261

62+
isDisabled() {
63+
return this.command.command.startsWith('//')
64+
}
65+
6366
execute(commandExecutor, options, targetOverride) {
6467
if (this._isRetryLimit()) {
6568
return Promise.resolve({
6669
result:
6770
'Max retry limit exceeded. To override it, specify a new limit in the value input field.',
6871
})
6972
}
73+
if (this.isDisabled()) {
74+
return Promise.resolve(
75+
this._executionResult(commandExecutor, { result: 'success' })
76+
)
77+
}
7078
return commandExecutor.beforeCommand(this.command).then(() => {
7179
return this._executeCommand(
7280
commandExecutor,

0 commit comments

Comments
 (0)