Click in icon to empty search (ff issue with selenium - element is not currently visible).

This commit is contained in:
Martin Edenhofer 2016-03-15 09:21:33 +01:00
parent 72d22ad56b
commit bfefdb8470

View file

@ -360,6 +360,7 @@ class TestCase < Test::Unit::TestCase
# sleep 0.2 # sleep 0.2
#end #end
else else
sleep 1
instance.find_elements(partial_link_text: params[:text])[0].click instance.find_elements(partial_link_text: params[:text])[0].click
end end
sleep 0.4 if !params[:fast] sleep 0.4 if !params[:fast]
@ -1846,7 +1847,7 @@ wait untill text in selector disabppears
sleep 3 sleep 3
# empty search box by x # empty search box by x
instance.find_elements(css: '.search .empty-search')[0].click instance.find_elements(css: '.search .empty-search .icon')[0].click
sleep 0.5 sleep 0.5
text = instance.find_elements(css: '#global-search')[0].attribute('value') text = instance.find_elements(css: '#global-search')[0].attribute('value')
if !text if !text
@ -1974,7 +1975,7 @@ wait untill text in selector disabppears
element.clear element.clear
element.send_keys(params[:value]) element.send_keys(params[:value])
sleep 3 sleep 3
instance.find_elements(css: '.search .empty-search')[0].click instance.find_elements(css: '.search .empty-search .icon')[0].click
sleep 0.5 sleep 0.5
text = instance.find_elements(css: '#global-search')[0].attribute('value') text = instance.find_elements(css: '#global-search')[0].attribute('value')
if !text if !text