Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Friday, March 3, 2017

c# pop up div link button is not clicked

how to work c# pop up div link button is not clicked:



In this post we make a popup div and try to use it in coding .
<div class="fixed-popup popup-square popup-connections dismissable" 
id="popup-remove-connection" style="display: block;">
  <div class="popup-inner">
    <div class="close">X</div>
    <h3>Are you sure you'd like to remove this connection?</h3>
    <div class="button-bar">
      <a class="btn-close button button-link" href="#">Cancel</a>
      <a class="btn-approve button" href="#">Yes, I'm Sure</a>
    </div>
  </div>
</div>

This pop up div shows when i click a button than i am 
trying to click on "Yes, I'm Sure" using this code :

 Link linkApprovebtn = browser.Link(Find.ByText("Yes, I'm Sure"));
   if (linkApprovebtn.Exists)
                  {
                    linkApprovebtn.Click();
                      browser.WaitForComplete();
                        }
the code execute the click but nothing happend on the
 i have also tried this code:

   AlertDialogHandler AlertDialog = new AlertDialogHandler();
                                        try
                                        {
            
            Settings.AutoStartDialogWatcher = true;
             Settings.AutoCloseDialogs = true;

            browser.AddDialogHandler(AlertDialog);

             AlertDialog.WaitUntilExists();

             
              if (AlertDialog.Exists())
                {

               
                 AlertDialog.OKButton.Click();
                  browser.WaitForComplete();
                   browser.RemoveDialogHandler(AlertDialog);

                                            }
                                        }

2 comments:

  1. I just see the post i am so happy the post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be subscribing to your feed and I hope you post again soon.
    New Zealand Education Consultants in Chennai

    ReplyDelete
  2. Wonderful blog.. Thanks for sharing informative Post. Its very useful to me.

    Installment loans
    Payday loans
    Title loans

    ReplyDelete