Skip to content

Commit 787abe5

Browse files
committed
[test] fix race conditions in issue4286-inject-start-end
1 parent 3e750c5 commit 787abe5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/sanity/issue4286-inject-start-end/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<script>
5+
window.name = 'index';
56
nw.Window.open('popup.html', {
67
'inject_js_start': 'inject_start.js',
78
'inject_js_end': 'inject_end.js'

test/sanity/issue4286-inject-start-end/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
driver.implicitly_wait(5)
1414
time.sleep(1)
1515
try:
16-
print driver.current_url
1716
wait_window_handles(driver, 2)
17+
wait_switch_window_name(driver, 'index')
18+
print driver.current_url
1819
result = wait_for_element_id(driver, 'inject_start')
1920
print 'inject_js_start: %s' % result
2021
assert('success' in result)

0 commit comments

Comments
 (0)