Hi, Are you looking at this in irb? Sometimes that helps to debug the issue.
You can get to this point and she if watir can see the pop-up @browser.div(:class=>"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix").present? and if returns true then it sees it. Though from the above its trying to do that. The html you have listed above, is that all of HTML code for the pop-up? Thanks, Joe On Wednesday, January 16, 2013 1:10:29 PM UTC-5, Deepak Kumar wrote: > > > > > > > [image: Inline image 1] > > > I want to click the *OK button *under this message board. Can this screen > shot help. > I also tried "when_present.click" action but i am getting timed out after > 60 seconds. > * > * > * > * > * > * > * > * > * > * > On Wed, Jan 16, 2013 at 8:17 PM, Dan Franko <[email protected]<javascript:> > > wrote: > >> I disagree that you need both the text and class in this case. Unless >> there's another button or span with that same text, you don't need anything >> else. >> >> On Jan 16, 2013, at 9:41 AM, Super Kevy >> <[email protected]<javascript:>> >> wrote: >> >> ie$.span(:class => 'ui-button-text', text=>'Ok').flash >> ie$.span(:class => 'ui-button-text', text=>'Ok').click >> >> I think the other failure is there is more then one class value in the >> parent div & button. >> Not sure how watir handles that >> >> >> >> >> On Tuesday, January 15, 2013 10:50:57 AM UTC-6, Deepak Kumar wrote: >>> >>> Hi, >>> >>> following is the HTML code >>> >>> *<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"> >>> * >>> *<button type="button" class="ui-button ui-widget ui-state-default >>> ui-corner-all ui-button-text-only" role="button" aria-disabled="false">* >>> *<span class="ui-button-text">Ok</span></button></div>* >>> >>> How i can click the span. >>> I used the following code.but it did'nt helped :( >>> >>> *$ie.div(:class , "ui-dialog-buttonpane ui-widget-content >>> ui-helper-clearfix").button(:class,"ui-button ui-widget >>> ui-state-default ui-corner-all ui-button-text-only").span(: >>> class,"ui-button-text").click* >>> >>> I am getting the following error >>> >>> *Unable to locate element, using {:class=>"ui-dialog-buttonpane >>> ui-widget-content ui-helper-clearfix", :tag_name=>["div"]}* >>> >>> -- >> Before posting, please read http://watir.com/support. In short: search >> before you ask, be nice. >> >> [email protected] <javascript:> >> http://groups.google.com/group/watir-general >> [email protected] <javascript:> >> >> -- >> Before posting, please read http://watir.com/support. In short: search >> before you ask, be nice. >> >> [email protected] <javascript:> >> http://groups.google.com/group/watir-general >> [email protected] <javascript:> >> > > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
