Problem: In IE11, a dialog alert is displayed of "Are you sure you want to leave this page?" with two options, 'Leave this page' or Stay on this page'.
In object spy, this is what is captured:
browser.Describe<IDialog>(new DialogDescription
{
IsOwnedWindow = true,
IsChildWindow = false,
Text = @"Windows Internet Explorer",
NativeClass = @"#32770"
}).Describe<IButton>(new ButtonDescription
{
Text = @"&Leave this page",
NativeClass = @"Button"
});
How can I click on the 'Leave this option'?