Performance enhancement on input fields (only by single command).
This commit is contained in:
parent
72e2a73f63
commit
0165ec8f72
3 changed files with 21 additions and 11 deletions
|
@ -381,7 +381,7 @@ class AgentTicketActionLevel5Test < TestCase
|
||||||
{
|
{
|
||||||
:where => :instance2,
|
:where => :instance2,
|
||||||
:execute => 'wait',
|
:execute => 'wait',
|
||||||
:value => 10,
|
:value => 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:where => :instance2,
|
:where => :instance2,
|
||||||
|
@ -458,7 +458,7 @@ class AgentTicketActionLevel5Test < TestCase
|
||||||
{
|
{
|
||||||
:where => :instance2,
|
:where => :instance2,
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
:css => 'body',
|
:css => '.active .ticket-edit',
|
||||||
:value => random,
|
:value => random,
|
||||||
:match_result => true,
|
:match_result => true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -34,13 +34,17 @@ class AgentUserManageTest < TestCase
|
||||||
:execute => 'sendkey',
|
:execute => 'sendkey',
|
||||||
:value => [:arrow_down]
|
:value => [:arrow_down]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
:execute => 'wait',
|
||||||
|
:value => 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
:execute => 'click',
|
:execute => 'click',
|
||||||
:css => '.active .newTicket .recipientList-entry.js-user-new',
|
:css => '.active .newTicket .recipientList-entry.js-user-new',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'wait',
|
:execute => 'wait',
|
||||||
:value => 2,
|
:value => 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
|
@ -160,6 +164,10 @@ class AgentUserManageTest < TestCase
|
||||||
:execute => 'sendkey',
|
:execute => 'sendkey',
|
||||||
:value => [:arrow_down]
|
:value => [:arrow_down]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
:execute => 'wait',
|
||||||
|
:value => 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
:execute => 'click',
|
:execute => 'click',
|
||||||
:css => '.active .newTicket .recipientList-entry.js-user.is-active',
|
:css => '.active .newTicket .recipientList-entry.js-user.is-active',
|
||||||
|
|
|
@ -293,7 +293,7 @@ class TestCase < Test::Unit::TestCase
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
puts e.message
|
#puts e.message
|
||||||
assert( true, "(#{test[:name]}) not found" )
|
assert( true, "(#{test[:name]}) not found" )
|
||||||
sleep 0.4
|
sleep 0.4
|
||||||
return
|
return
|
||||||
|
@ -519,14 +519,16 @@ class TestCase < Test::Unit::TestCase
|
||||||
element.clear
|
element.clear
|
||||||
if action[:value] == '###stack###'
|
if action[:value] == '###stack###'
|
||||||
element.send_keys( @stack )
|
element.send_keys( @stack )
|
||||||
|
else
|
||||||
|
if !action[:slow]
|
||||||
|
element.send_keys( action[:value] )
|
||||||
else
|
else
|
||||||
element.send_keys( '' )
|
element.send_keys( '' )
|
||||||
keys = action[:value].to_s.split('')
|
keys = action[:value].to_s.split('')
|
||||||
keys.each {|key|
|
keys.each {|key|
|
||||||
instance.action.send_keys(key).perform
|
instance.action.send_keys(key).perform
|
||||||
sleep 0.01
|
|
||||||
}
|
}
|
||||||
#element.send_keys( action[:value] )
|
end
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
end
|
end
|
||||||
elsif action[:execute] == 'select'
|
elsif action[:execute] == 'select'
|
||||||
|
|
Loading…
Reference in a new issue