Friday, October 1, 2010

Housie Game Coin Shuffler

A small application to pick random numbers while playing housie game.
http://www.megaupload.com/?d=GV8CCM9D

Friday, February 19, 2010

Security certificates while using selenium

Most of the problems that users are facing is handling security certificate alert boxes that browsers normally throw while transition from HTTP to HTTPS protocol.

Although starting your browser with different run modes (ex *chorme for firfox and *iehta for IE) this is not solving the problem. Even if this is solved, next question is how to change something in system while the script is executing like Registry etc.

I am planning to write a server componet using AutoIt, so that users can call some special functions to handle these boxes and other conditions. Please ask if you need any special requirements so that I can design a better framework before starting the code.

Tuesday, February 16, 2010

Selenium AutoIT

Hello, welcome to my first blog.

As the blog title says, I have started working on creating a selenium autoit driver.

Currently, I have created couple of files which can drive the selenese commands and execute the test case.

I did not find any upload file feature so hosting the files on another server. :(


Download from here

After unzipping the rar file, you will find the below files:

  • Selenium.au3
  • SupportFunctions.au3
  • GoogleSearch.au3 
  • options.ini 
more details of each file:
Selenium.au3 - This file contains the functions for starting selenium server, stopping the session and executing the selenese commands.

SupportFunctions.au3 - This file contains the functions for report and etc..

options.ini - This contains the different configuration to run/start the server.

GoogleSearch.au3 - This is the actual script file which contains the actions to be performed on the browser.
  • Each test case is written as a function. Example shown below.
========================================
Func BasicSearchInGoogle()
_TestCaseBegin("BasicSearchInGoogle")
        _Execute("open", "/")
_Execute("windowMaximize")
_Execute("type", "q", "AutoIt")
_Execute("clickAndWait", "btnG")
$test = _Execute("assertTextPresent", "AutoIt")
If ($test) Then
_TestPass()
Else
_TestFail()
EndIf
_TestCaseEnd()
EndFunc   ;==>BasicSearchInGoogle
========================================

  • There are some special functions to be called and below are such functions:
  1. _TestCaseBegin(STRING sTestCaseName) - This function should be called at the start of the test case with test case name. This is required to maintain the results files and counters.
  2. _TestCaseEnd() - To handle any cases that we like to do after a test case is executed.
  3. _ScriptStart() - This is required to start the selenium server and to initialize all the global variables.
  4. _ScriptEnd() - This is to handle any action after a script is completed. Ex: sending a mail with results.
  5. _TestPass() - Call this function if you know that your test case is passed.
  6. _TestFail() - Call this function if you know that your test case is failed.
Please let me know if you need further details.