Thanks a lot Justin in taking time to write a detailed explanation about
the issue. Novice automation engineers like me are very blessed to have
people like you and Titus showing patience to explain basic things to us.
You are right about the issue. Though Im not able to confirm with the devs
Hi Navi,
At this point, I would say there is a design flaw in Page-Object's #alert
method, which does:
if @browser.alert.exists?
value = @browser.alert.text
@browser.alert.ok
end
The conditional check is likely the cause of your problem. I don't know the
history of how we got here, but my
Hi Titus
@browser.div(:class => 'address-details', :index =>0).click
# alert_text = alert do
# @browser.div(:class => 'select-checkbox', :index =>1).click
# end
# sleep 10
# puts alert_text
@browser.div(:class => 'select-checkbox', :index =>1).click
puts
On Thursday, 11 April 2019 12:23:16 UTC+10, NaviHan wrote:
>
> Im trying to capture the alert text and dismiss the alert using the
> "alert" method
>
> def test
> @browser.div(:class => 'address-details', :index =>0).click
> alert_text = alert do
> @browser.div(:class =>