[wtr-general] Re: Cant capture alert using "alert" method of Page Object

2019-04-12 Thread NaviHan
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

[wtr-general] Re: Cant capture alert using "alert" method of Page Object

2019-04-11 Thread Justin Ko
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

[wtr-general] Re: Cant capture alert using "alert" method of Page Object

2019-04-10 Thread NaviHan
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

[wtr-general] Re: Cant capture alert using "alert" method of Page Object

2019-04-10 Thread NaviHan
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 =>