This is a migrated thread and some comments may be shown as answers.

Can't click on jquery button on dialog modal confirmation

1 Answer 211 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anna
Top achievements
Rank 1
Anna asked on 28 Mar 2011, 08:34 AM
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?




1 Answer, 1 is accepted

Sort by
0
Anna
Top achievements
Rank 1
answered on 28 Mar 2011, 09:55 AM
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.
Tags
General Discussions
Asked by
Anna
Top achievements
Rank 1
Answers by
Anna
Top achievements
Rank 1
Share this question
or