HTML:

<div class="ui-dialog-buttonset">
 <button class="otherButtonClass" type="button" role="button"
aria-disabled="false">
  <span class="ui-button-text">Rename</span>
 </button>
 <button class="cancelButtonClass" type="button" role="button"
aria-disabled="false">
  <span class="ui-button-text">Cancel</span>
 </button>
</div>

Code:

script = <<-end
element = arguments[0];
element.setAttribute('aria-disabled','true');
return element
end

elem = driver.find_element(:css,'div.ui-dialog-buttonset>button')[0]
elem = driver.execute_script(script,elem)
elem.click

`click` is not working. Did I write the `script` correcly?

-- 
Posted via http://www.ruby-forum.com/.