File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
packages/selenium-ide/src Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ function isExtCommand(command) {
173173 case "open" :
174174 case "selectFrame" :
175175 case "selectWindow" :
176+ case "setSpeed" :
176177 case "close" :
177178 return true ;
178179 default :
Original file line number Diff line number Diff line change @@ -21,6 +21,16 @@ import UiState from "../../stores/view/UiState";
2121const { ExtCommand, isExtCommand } = window ;
2222
2323const extCommand = new ExtCommand ( ) ;
24+ // In order to not break the separation of the execution loop from the state of the playback
25+ // I will set doSetSpeed here so that extCommand will not be aware of the state
26+ extCommand . doSetSpeed = ( speed ) => {
27+ if ( speed < 0 ) speed = 0 ;
28+ if ( speed > PlaybackState . maxDelay ) speed = PlaybackState . maxDelay ;
29+
30+ PlaybackState . setDelay ( speed ) ;
31+ return Promise . resolve ( ) ;
32+ } ;
33+
2434window . extCommand = extCommand ;
2535const xlateArgument = window . xlateArgument ;
2636let baseUrl = "" ;
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export const Commands = Object.freeze({
104104 selectFrame : "select frame" ,
105105 selectWindow : "select window" ,
106106 sendKeys : "send keys" ,
107+ setSpeed : "set speed" ,
107108 store : "store" ,
108109 storeText : "store text" ,
109110 storeTitle : "store title" ,
You can’t perform that action at this time.
0 commit comments