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

2019-04-10 Thread Titus Fortner
I don't like the way Page Object uses blocks... In Watir it is simply: alert_text = @browser.alert.text @browser.alert.dismiss On Wed, Apr 10, 2019 at 9:23 PM NaviHan wrote: > > Im trying to capture the alert text and dismiss the alert using the "alert" > method > > def test >

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

2019-04-10 Thread NaviHan
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 => 'select-checkbox', :index =>1).click end sleep 10 puts alert_text