File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 4
4
import subprocess
5
5
import platform
6
6
from subprocess import Popen , PIPE
7
+ import sys
8
+ sys .path .append (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
9
+ from nw_util import *
7
10
8
11
from selenium import webdriver
9
12
from selenium .webdriver .chrome .options import Options
31
34
driver = webdriver .Chrome (executable_path = os .environ ['CHROMEDRIVER' ], chrome_options = chrome_options )
32
35
try :
33
36
print driver .current_url
34
- result = driver .find_element_by_id ('result' )
35
- print result .get_attribute ('innerHTML' )
36
- assert ("52" in result .get_attribute ('innerHTML' ))
37
- result2 = driver .find_element_by_id ('source' ).get_attribute ('innerHTML' )
37
+ result = wait_for_element_id_content (driver , 'result' , '52' )
38
+ print result
39
+ result2 = wait_for_element_id_content (driver , 'source' , 'native code' )
38
40
print result2
39
41
assert ("{ [native code] }" in result2 )
40
42
finally :
You can’t perform that action at this time.
0 commit comments