Skip to content

Commit da790fd

Browse files
committed
[test] fix module-bin: wait for result properly
1 parent 924222b commit da790fd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/sanity/module-bin/test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import subprocess
55
import platform
66
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 *
710

811
from selenium import webdriver
912
from selenium.webdriver.chrome.options import Options
@@ -31,10 +34,9 @@
3134
driver = webdriver.Chrome(executable_path=os.environ['CHROMEDRIVER'], chrome_options=chrome_options)
3235
try:
3336
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')
3840
print result2
3941
assert("{ [native code] }" in result2)
4042
finally:

0 commit comments

Comments
 (0)