I sleep () will try to avoid the command that I want to replace it with improved functions I like Wait_for_element_exists () do not work under iOS example:
touch has been marked ( "button" Button_in_the_first_view '') Wait_for_element_exists (marked "button:" Btn_in_ the_second_view ' ") touch (" button marked: 'Button_in_the_third_view' ")
Calabash not waiting for another button to appear on screen It goes in line 3 without any delay and fails in testing
If I try to determine the properties of another, it is available immediately, is still capable and this fact Regardless of whether the navigation view controller hiding is never ending push animation ago Views:
touch ( "the button marked: 'button_in_the_first_view' ') query (" Delete button:' button_in_the_second_view ' '). Count # = & gt; 1 query ("button marked: 'Button_in_the_second_view' ", is enabled). First # = & gt; 1 query ("button marked: 'button_in_the_second_view'" ,: isHidden). First # = & gt; text ">
wait_for_elements_exist () works you will find out where he is triggered incorrectly. As says Lasse sometimes you animation speed are at home on wait_for_elements_exist method uses less sleep (0.3) would need to wait
wait_for_elements_exist (elements_arr, {: timeout = & for gt; 10, waiting # Maximum number of seconds: retry_frequency => 0.2, # wait long before trying again on block: post_timeout = & gt; ; After 0.1, return #BLOCK it waits: timeout_message = & gt; "ends wait ..." option in case # message: [screenshot_on_error = & gt; true # error Take a screenshot}}
Use these options, what actually happens on the screen to find the element_exists () function and some UI queries? What are the two buttons state and What will happen next?
Go ahead and you can touch it like this Scope button can check the state.
then / ^ should I see "([^ \"] *) "button is $ $ enabled / Do = text screenshot_and_raise" Current status is not enabled for state: # {text} "End sleep (STEP_PAUSE) end then / $ i" ([^ \ "] *)" followed by $ / do | The name will appear. Element = "Button marked: '# {name}'" If element_does_not_exist (element) wait_for_elements_exist ([element],: timeout => 10) sleep (STEP_PAUSE) touch (element) sleep (0.3) alesif element_exists touch (element) (Element) sleep (0.3) Other screenshots_ and_rez "'# {Name}' is not a button." End of End
Here I will add something. Check if you can find a solution there.
No comments:
Post a Comment