Hi
I'm using webaii 2010.3.1421.0 and trying to handle a javascript Confirmdialog.
First I used a button element as button and everything worked OK, but I had replace the button with an anchor and the the dialog handling stopped working.
The result after the change to an anchor is that the dialog popsup but after that nothing happends, the execution stop after the Find and Click statement.
Tested using Chrome, and it works with this, but when I'm using Firefox or Internet Explorer. When I'm using Chrome my FindByContent stops to work. :(
The code for handling the ConfirmDialog
HTML
Thanks in advance!
I'm using webaii 2010.3.1421.0 and trying to handle a javascript Confirmdialog.
First I used a button element as button and everything worked OK, but I had replace the button with an anchor and the the dialog handling stopped working.
The result after the change to an anchor is that the dialog popsup but after that nothing happends, the execution stop after the Find and Click statement.
Tested using Chrome, and it works with this, but when I'm using Firefox or Internet Explorer. When I'm using Chrome my FindByContent stops to work. :(
The code for handling the ConfirmDialog
public
void
ClickAcceptButton(DialogButton clickButton)
{
var confirmDialog =
new
ConfirmDialog(TestContext.ActiveBrowser, clickButton);
TestContext.Manager.DialogMonitor.AddDialog(confirmDialog);
TestContext.Manager.DialogMonitor.Start();
Find.ById<HtmlAnchor>(
"accept"
).Click(
false
);
//this was Find.ById<HtmlInputButton>("accept").Click(false);
confirmDialog.WaitUntilHandled(5000);
TestContext.Manager.DialogMonitor.Stop();
}
HTML
<
a
href
=
'#'
id
=
'accept'
>
<
span
class
=
'button-green'
>Accept</
span
>
</
a
>
Thanks in advance!