public override void Executar(Wax.IExecutionContext contexto)
        {
            Esperar(3000);

            DialogHelper dialogHelper = new DialogHelper(contexto);

            dialogHelper.ExecutarConfirmJavaScript<Button>(contexto.Browser.Button("btnExcluir"), 60);
        }
        public void executar_confirm_do_javascript_certificando_se_que_o_contexto_ficou_limpo_sem_nenhum_confirm()
        {
            Castle.DynamicProxy.Generators.AttributesToAvoidReplicating.Add(typeof(TypeIdentifierAttribute));

            var browser = MockRepository.GenerateMock<IEBrowser>(MockRepository.GenerateMock<IWebBrowser2>());

            var executionContext = MockRepository.GenerateMock<IExecutionContext>();

            executionContext.Expect(x => x.Browser).Return(MockRepository.GenerateMock<IE>(browser));

            //executionContext.Browser = MockRepository.GenerateMock<IE>(browser);

            var dialogWatcher = MockRepository.GenerateMock<DialogWatcher>(MockRepository.GenerateMock<Window>(IntPtr.Zero));

            executionContext.Browser.Expect(x => x.DialogWatcher).Return(dialogWatcher);

            var confirmJavaScript = MockRepository.GenerateMock<IDialog>();

            var dialogHelper = new DialogHelper(executionContext, confirmJavaScript);

            //IList<ElementTag> elementTags, Constraint findBy
            var elementFinder = MockRepository.GenerateMock<ElementFinder>(new List<ElementTag>(),
                                                                           MockRepository.GenerateMock<Constraint>());

            var botaoExcluir = MockRepository.GenerateMock<Link>(MockRepository.GenerateMock<DomContainer>(), elementFinder);

            dialogHelper.ExecutarConfirmJavaScript<Link>(botaoExcluir, 5);

            Assert.AreEqual(dialogHelper.HandlerCount, 0);

            //Wax.Runner.TestRunner testRunner = new Wax.Runner.TestRunner();

            //testRunner.FileName = @"E:\Projetos\Mongeral\proj-esimteste\proj-esimteste\trunk\Regressao\Mongeral.Regressao.Framework.Exemplos\bin\Debug\Mongeral.Regressao.Framework.Exemplos.dll";

            //testRunner.Load();

            //testRunner.Execute();
        }