File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
test/sanity/issue3780-jailed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 26
26
devtools_click_tab (driver , 'console' )
27
27
print 'send_keys "location.pathname<enter>"'
28
28
devtools_type_in_console (driver , 'location.pathname\n ' )
29
- pathname = driver .find_element_by_css_selector ('.console-user-command-result .console-message-text .object-value-string' ).get_attribute ('textContent' )
30
- print pathname
31
- assert ('/child.html' in pathname )
29
+ timeout = 10
30
+ while timeout > 0 :
31
+ try :
32
+ pathname = driver .find_element_by_css_selector ('.console-user-command-result .console-message-text .object-value-string' ).get_attribute ('textContent' )
33
+ print pathname
34
+ assert ('/child.html' in pathname )
35
+ break
36
+ except selenium .common .exceptions .NoSuchElementException :
37
+ pass
38
+ time .sleep (1 )
39
+ timeout = timeout - 1
40
+ if timeout <= 0 :
41
+ raise Exception ('Timeout when waiting for result' )
32
42
finally :
33
43
driver .quit ()
You can’t perform that action at this time.
0 commit comments