News and Events
April 11, 2009

Sahi in DevCamp

Presented on Sahi in DevCamp Bangalore held in the ThoughtWorks office. I spoke in the 10.30 slot and was pleasantly surprised by the turnout. Show cased how Sahi can be used to test https and AJAX sites using the example of gmail. The response was encouraging.Below is the code that was needed to automate Gmail.function login($username, $password){_setValue(_textbox("Email"), $username);_setValue(_password("Passwd"), $password);_click(_submit("Sign in"));}</pre>login("sahi.abcde", "tough123");_click(_spandiv("Compose Mail"));_setValue(_textarea("to"), "&lt;;, ");_setValue(_textbox("subject"), "important subject");_rteWrite(_rte(0, _near(_textbox("subject"))), "lots of content");_click(_spandiv("Send[9]"));_assertExists(_cell("Your message has been sent. View message"));_click(_link("Sent Mail"));_assertExists(_spandiv("To:"));_click(_checkbox(0, _near(_spandiv("To:"))));_expectConfirm("You are about to move the entire conversation to the Trash. Are you sure you want to trash the entire conversation containing your sent message?", true)_click(_spandiv("Delete[14]"));_assertExists(_cell("The conversation has been moved to the Trash. Learn more Undo"));_assertExists(_cell("No sent messages! Send one now!"));_click(_link("Sign out"));This was the first cut, of which all lines except those using _near were recorded via the Sahi controller.I will follow up with a more detailed post on other discussions I had in DevCamp.Note that _near is available only in the most recent nightly build (2009-04-11)This nightly release was made for folks at DevCamp who wish to replicate what I demoed.

Continue reading

Tip of the Day 11

Tip of the Day 10