Skip to content

Commit e095176

Browse files
committed
[test] fix flaky worker-nwbin
1 parent ca8f707 commit e095176

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/sanity/worker-nwbin/test.py

Lines changed: 6 additions & 3 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
@@ -24,8 +27,8 @@
2427
driver = webdriver.Chrome(executable_path=os.environ['CHROMEDRIVER'], chrome_options=chrome_options)
2528
try:
2629
print driver.current_url
27-
result = driver.find_element_by_id('result')
28-
print result.get_attribute('innerHTML')
29-
assert("840" == result.get_attribute('innerHTML'))
30+
result = wait_for_element_id_content(driver, 'result', '840')
31+
print result
32+
assert("840" == result)
3033
finally:
3134
driver.quit()

0 commit comments

Comments
 (0)