NaviHan
2018-09-25 04:41:14 UTC
Its been some days I found this issue untill I understood today the cause
of failure.
The behavior is
a. The user enters the email on check out page
b. A pop up skids in from the top of the page
c. The user clicks a "continue as guest "button on the pop up
d. The pop up skids back in and disappears
e. Verify the pop up disappeared
The issue is between step b and step c there is a time when the pop up is
sliding into the page until its loaded completely. During this time the
script clicks the dismiss button. Because the pop hasent completed loading
the click doesn't make it disappear.
Similarly becasue the pop up takes time to slide back and disapper the
check at step e fails.
For the time being Im working around this issue with sleeps. But is there a
neater way?
The pop up is defined as
button(:continue_as_guest, :class => ['button', 'close-dialog-button'])
The code that does the job is
def continue_as_guest
continue_as_guest_element.wait_until(&:present?).click
end
After sleep, which works fine
def continue_as_guest
sleep 5
continue_as_guest_element.wait_until(&:present?).click
sleep 5
end
Note:- I have also tried to wait_while(&:present?) still the issue stays
the same
def continue_as_guest
continue_as_guest_element.wait_until(&:present?).tap(&:click).wait_while(&:present?)
end
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.
watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
of failure.
The behavior is
a. The user enters the email on check out page
b. A pop up skids in from the top of the page
c. The user clicks a "continue as guest "button on the pop up
d. The pop up skids back in and disappears
e. Verify the pop up disappeared
The issue is between step b and step c there is a time when the pop up is
sliding into the page until its loaded completely. During this time the
script clicks the dismiss button. Because the pop hasent completed loading
the click doesn't make it disappear.
Similarly becasue the pop up takes time to slide back and disapper the
check at step e fails.
For the time being Im working around this issue with sleeps. But is there a
neater way?
The pop up is defined as
button(:continue_as_guest, :class => ['button', 'close-dialog-button'])
The code that does the job is
def continue_as_guest
continue_as_guest_element.wait_until(&:present?).click
end
After sleep, which works fine
def continue_as_guest
sleep 5
continue_as_guest_element.wait_until(&:present?).click
sleep 5
end
Note:- I have also tried to wait_while(&:present?) still the issue stays
the same
def continue_as_guest
continue_as_guest_element.wait_until(&:present?).tap(&:click).wait_while(&:present?)
end
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.
watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.