File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
test/sanity/document-start-end Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
import time
2
2
import os
3
+ import sys
3
4
4
5
from selenium import webdriver
5
6
from selenium .webdriver .chrome .options import Options
7
+ sys .path .append (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
8
+ from nw_util import *
9
+
6
10
chrome_options = Options ()
7
11
chrome_options .add_argument ("nwapp=" + os .path .dirname (os .path .abspath (__file__ )))
8
12
9
13
driver = webdriver .Chrome (executable_path = os .environ ['CHROMEDRIVER' ], chrome_options = chrome_options )
10
14
time .sleep (1 )
11
15
try :
12
16
print driver .current_url
13
- result = driver . find_element_by_id ( 'result' ). get_attribute ( 'innerHTML ' )
14
- result2 = driver . find_element_by_id ( 'result2' ). get_attribute ( 'innerHTML ' )
17
+ result = wait_for_element_id ( driver , 'result' )
18
+ result2 = wait_for_element_id ( driver , 'result2' )
15
19
print result
16
20
print result2
17
21
assert (result == 'success from popup' and result2 == 'startiframe' )
You can’t perform that action at this time.
0 commit comments