Watir Webdriver

Apart from Technical Topics, increasingly i find myself wanting to write about other topics that interests me - Entreprenuership and Business, Leadership, Africa, Service Industry (e.g Hotels, Restaurant). My writings would always represent my opinions and it might change from time to time.

Type into a textfield with keypress event disabled

A colleague asked me how to automate a disabled text-box which has a calendar attached to it. The customer has specified that they want keyboard entries disabled for this text-field, hence every user of the website has to use the calendar drop down. Previously, this has been automated by using webdriver to type the text into the text box but as it was disabled, this was impossible. imagine, this is the html for the textbox:

Watir-Webdriver: Website certificate does not come from a trusted source

A colleague came across this problem while executing our acceptance tests. The issue was related to the fact that the SSL certificate for the site was named differently from the domain on which the test were being executed on . Hence, we got this error: “xxx.xxx.xxxx uses an invalid security certificate.The certificate does not come from a trusted source.The certificate is only valid for <a id=“cert_domain_link” title=“xxx.xxx.com”>xxxx.xxxxx.com</a>The certificate will not be valid until 13-Jul-11 10:28 AM.

Test automation click might not completely simulate an actual human click

I have been working at this client where i am opportuned to use cucumber, watir-webdriver and i came across this problem today. The application i am testing is an e-commerce site and i am writing test for a page on which i click on an item and the item appears on the shopping basket area of the site. My code look like [code] def select_item(item_name) @browser.li(:text => /#{item_name}/).link(:class_name => “addOptions”).click Watir::Wait.