Improved ticket_create() - wait until screen exists.

This commit is contained in:
Martin Edenhofer 2016-05-01 01:58:15 +02:00
parent dc6b121091
commit fb4c2c90b3

View file

@ -1641,12 +1641,19 @@ wait untill text in selector disabppears
mute_log: true, mute_log: true,
) )
found = false
(1..4).each {
element = instance.find_elements(css: '.active .newTicket')[0] element = instance.find_elements(css: '.active .newTicket')[0]
if !element if element
found = false
break
end
sleep 1
}
if !found
screenshot(browser: instance, comment: 'ticket_create_failed') screenshot(browser: instance, comment: 'ticket_create_failed')
raise 'no ticket create screen found!' raise 'no ticket create screen found!'
end end
sleep 0.4
if data[:group] if data[:group]
if data[:group] == '-NONE-' if data[:group] == '-NONE-'