Improved click helper with param text.

This commit is contained in:
Martin Edenhofer 2016-05-29 02:51:58 +02:00
parent db224d5bc3
commit f08fcc5e55
2 changed files with 11 additions and 2 deletions

View file

@ -88,8 +88,9 @@ class AgentTicketActionLevel0Test < TestCase
# customer ticket create
click(css: 'a[href="#new"]')
click(css: 'a[href="#customer_ticket_new"]', wait: 3)
click(css: 'a[href="#customer_ticket_new"]', wait: 5)
exists(css: '.newTicket')
exists_not(css: '.newTicket select[name="group_id"]')
set(

View file

@ -405,7 +405,15 @@ class TestCase < Test::Unit::TestCase
else
sleep 0.5
instance.find_elements(partial_link_text: params[:text])[0].click
begin
instance.find_elements(partial_link_text: params[:text])[0].click
rescue => e
sleep 0.5
# just try again
log('click', { rescure: true })
instance.find_elements(partial_link_text: params[:text])[0].click
end
end
sleep 0.2 if !params[:fast]
sleep params[:wait] if params[:wait]