File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
test/sanity/issue6113-mac-create-crash Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
+ < title > issue6113-mac-create-crash</ title >
7
+ </ head >
8
+ < body >
9
+ < h3 id ="result "> success</ h3 >
10
+ < script >
11
+ chrome . windows . create ( { url : "https://google.com" , type :"popup" } ) ;
12
+ </ script >
13
+ </ body >
14
+ </ html >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " issue6113-mac-create-crash" ,
3
+ "main" : " index.html"
4
+ }
Original file line number Diff line number Diff line change
1
+ import time
2
+ import os
3
+ import platform
4
+ import sys
5
+
6
+ if platform .system () != 'Darwin' :
7
+ print 'Skipped for non Mac platform'
8
+ sys .exit (0 )
9
+
10
+ from selenium import webdriver
11
+ from selenium .webdriver .chrome .options import Options
12
+
13
+ sys .path .append (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
14
+ from nw_util import *
15
+
16
+ chrome_options = Options ()
17
+ chrome_options .add_argument ("nwapp=" + os .path .dirname (os .path .abspath (__file__ )))
18
+
19
+ driver = webdriver .Chrome (executable_path = os .environ ['CHROMEDRIVER' ], chrome_options = chrome_options )
20
+ driver .implicitly_wait (2 )
21
+ try :
22
+ wait_window_handles (driver , 2 )
23
+ handles = driver .window_handles
24
+ print handles
25
+ driver .switch_to .window (handles [1 ])
26
+ output = driver .current_url
27
+ print output
28
+ print 'waiting for crash'
29
+ time .sleep (5 )
30
+ assert driver .title == "Google"
31
+ assert ("https://www.google.com/" in output )
32
+ print 'There is no crash'
33
+ finally :
34
+ driver .quit ()
You can’t perform that action at this time.
0 commit comments