Can't click on jquery button on dialog modal confirmation

2 posts, 0 answers
  1. Anna
    Anna avatar
    2 posts
    Member since:
    Jul 2010

    Posted 28 Mar 2011 Link to this post

    Hi
    I opened jquery dialog modal confirmation (http://jqueryui.com/demos/dialog/#modal-confirmation). There are two buttons. But I can't click any of them. In my case it looks like that:
    <body ...>
    <form class="class1" ....>
    <div class="class1-1" ....> //dialog title
    <div class="class1-2" ...> //dialog content
    <div class="class1-3" ....> //dialog buttons panel
    <div class="class1-3-1" ...> //dialog buttons
    <button type="button" jQuery1234="4"> Yes //yes button
    <button type="button" jQuery2345="5"> No //no button
    I tried:
    HtmlDiv popup1 = myManager.ActiveBrowser.Find.ByAttributes<HtmlDiv>("class=class1");
    HtmlControl buttons = popup1.Find.ByAttributes<HtmlControl>("class=class1-3-1");
    HtmlButton button1 = buttons.Find.ByContent<HtmlButton>("No");
    I also tried:
    HtmlControl button = popup1.Find.ByNodeIndexPath<HtmlControl>("2/0/1");

    My objects are not null. VS shows that button or button1 is {HtmlButton:<BUTTON jQuery2345="5">}. But button.Click() or button1.Click() does not work. There is even no error.

    I also tried:
    IList<HtmlInputButton> allbuttons = button.Find.jQuery().tag("button").button(); but in this case allbuttons is null.

    Can you help me to click on it?




  2. Anna
    Anna avatar
    2 posts
    Member since:
    Jul 2010

    Posted 28 Mar 2011 Link to this post

    Ok i found solution. It's very simple. Button was clicked but it was localized in wrong place ( Button was found before it appeard). I added RefreshDomTree() befor finding buttons (in my case: before finding popup1). Now it's ok.
Back to Top