File tree Expand file tree Collapse file tree 5 files changed +15
-7
lines changed
Expand file tree Collapse file tree 5 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @seleniumhq/selenium-ide" ,
3- "version" : " 4.0.0-alpha.4 " ,
3+ "version" : " 4.0.0-alpha.5 " ,
44 "private" : true ,
55 "description" : " Selenium IDE electron app" ,
66 "author" :
" Todd <[email protected] >" ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import installReactDevtools from './install-react-devtools'
88import { join } from 'path'
99
1010// Configure log file
11- const logFile = new Date ( ) . toISOString ( ) + '.main.log'
11+ const logFile = Date . now ( ) + '.main.log'
1212log . transports . file . resolvePath = ( ) => join ( app . getPath ( 'logs' ) , logFile )
1313Object . assign ( console , log . functions ) ;
1414
Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ export default class DriverController extends BaseController {
7979 setWindowSize : async ( _executor , width , height ) => {
8080 const window = this . session . windows . getLastPlaybackWindow ( )
8181 const pbWinCount = this . session . windows . playbackWindows . length
82- console . log ( pbWinCount , window ) ;
8382 const b = await window . getBounds ( )
8483 const calcNewX = b . x + Math . floor ( b . width / 2 ) - Math . floor ( width / 2 )
8584 const calcNewY =
Original file line number Diff line number Diff line change @@ -22,10 +22,16 @@ export const projectEditorCommands: MenuComponent = (session) => async () =>
2222 } ,
2323 {
2424 accelerator : 'CommandOrControl+R' ,
25- label : 'Load Recent' ,
25+ label : 'Recent Projects ' ,
2626 click : async ( ) => {
2727 await session . projects . showRecents ( )
2828 } ,
29+ submenu : ( await session . projects . getRecent ( ) ) . map ( ( project ) => ( {
30+ click : async ( ) => {
31+ await session . api . projects . load ( project )
32+ } ,
33+ label : project ,
34+ } ) ) ,
2935 } ,
3036 { type : 'separator' } ,
3137 {
Original file line number Diff line number Diff line change @@ -35,13 +35,11 @@ export default class PlaybackController extends BaseController {
3535 } ) => {
3636 const { driver } = executor
3737 const { windows } = this . session
38- if ( this . playRange [ 0 ] === 0 ) {
39- await windows . initializePlaybackWindow ( )
40- }
4138 const playbackWindow = await windows . getPlaybackWindow ( )
4239
4340 // Figure out playback window from document.title
4441 const handles = await driver . getAllWindowHandles ( )
42+ let success = false
4543 for ( let i = 0 , ii = handles . length ; i !== ii ; i ++ ) {
4644 try {
4745 await driver . switchTo ( ) . window ( handles [ i ] )
@@ -51,12 +49,17 @@ export default class PlaybackController extends BaseController {
5149 title === playbackWindow . getTitle ( ) &&
5250 url === playbackWindow . webContents . getURL ( )
5351 ) {
52+ success = true
5453 break
5554 }
5655 } catch ( e ) {
5756 console . warn ( 'Failed to switch to window' , e )
5857 }
5958 }
59+ if ( ! success ) {
60+ await windows . initializePlaybackWindow ( )
61+ await this . onBeforePlay ( { driver : executor } )
62+ }
6063 }
6164
6265 async pause ( ) {
You can’t perform that action at this time.
0 commit comments