File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
test/sanity/document-start-end Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ <h1 id='result2'>document event test</h1>
9
9
var thiswin = nw . Window . get ( ) ;
10
10
var is_top = true ;
11
11
var start_fired = false ;
12
+ window . name = "index" ;
12
13
thiswin . on ( 'document-start' , function ( frame ) {
13
14
if ( frame . is_top || start_fired ) return ;
14
15
document . getElementById ( 'result2' ) . innerHTML = 'start' ;
Original file line number Diff line number Diff line change 11
11
chrome_options .add_argument ("nwapp=" + os .path .dirname (os .path .abspath (__file__ )))
12
12
13
13
driver = webdriver .Chrome (executable_path = os .environ ['CHROMEDRIVER' ], chrome_options = chrome_options )
14
- time .sleep (1 )
15
14
try :
15
+ wait_switch_window_name (driver , 'index' )
16
16
print driver .current_url
17
17
result = wait_for_element_id (driver , 'result' )
18
18
result2 = wait_for_element_id (driver , 'result2' )
You can’t perform that action at this time.
0 commit comments