Improved click helper with param text.
This commit is contained in:
parent
db224d5bc3
commit
f08fcc5e55
2 changed files with 11 additions and 2 deletions
|
@ -88,8 +88,9 @@ class AgentTicketActionLevel0Test < TestCase
|
||||||
|
|
||||||
# customer ticket create
|
# customer ticket create
|
||||||
click(css: 'a[href="#new"]')
|
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"]')
|
exists_not(css: '.newTicket select[name="group_id"]')
|
||||||
|
|
||||||
set(
|
set(
|
||||||
|
|
|
@ -405,7 +405,15 @@ class TestCase < Test::Unit::TestCase
|
||||||
|
|
||||||
else
|
else
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
begin
|
||||||
instance.find_elements(partial_link_text: params[:text])[0].click
|
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
|
end
|
||||||
sleep 0.2 if !params[:fast]
|
sleep 0.2 if !params[:fast]
|
||||||
sleep params[:wait] if params[:wait]
|
sleep params[:wait] if params[:wait]
|
||||||
|
|
Loading…
Reference in a new issue