I don't believe the locator is the problem.

You should be able to identify it via the button or the span.  Use the 
dynamic waiting methods and not sleeps.  They will only wait as long as 
they have to and wait longer if your application happens to be running 
slowly.

b.button(:text => "Ok").when_present.click
b.span(:text => "Ok").when_present.click


On Tuesday, January 15, 2013 1:04:50 PM UTC-5, Deepak Kumar wrote:
>
> i am not good with using Xpath. Can Xpath help ?
>
> On Tuesday, January 15, 2013 10:20:57 PM UTC+5:30, 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]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to