An automation framework for performing automation testing of Web Applications using Selenium.
Version : 0.0.12
- Download Source zip or git clone the repository
- Import into your JAVA work-space
- Run maven install to install dependencies
- Configure the run configuration to pass in data file path as argument
- Create a test script data file
- Create data file that hosts configuration, execution list and test cases.
- Refer wiki on how to create test case file, which has the required format for execution.
- Launch a selenium grid server with browser instances
- Refer Examples - Grid_Script for launching selenium grid with Firefox and Chrome instances.
- Run the Main class
- Verify the test execution report generated by the framework
- Result report is generated in reports folder
- Element Location:
Name
- Finds an element using HTML nameTagName
- Finds an element using the tag nameCSS
- Finds an element using CSS pathXPATH
- Finds an element using XPathID
- Finds an element with HTML IDLinkText
- Finds a link/anchor element using exact textPartialLinkText
- Finds a link/anchor element using partial text
- Available Actions:
-
General Functions:
Wait
- Waits for user defined secondsJavascript
- Executes a JS statementRun
- Runs another test case as boxed within an executionSwitchTo
- Switches to another windowSwitchToParent
- Jumps back to parent windowEvaluate
- Evaluates a mathematical expression (Uses Browsers JS Runtime) and returns the value
-
Web Element Functions:
Count
- Count the number of web elementsisDisplayed
|isPresent
- Verify if a web element is displayedisEmpty
- Verify if a web element is emptyisNotDisplayed
|isNotPresent
- Verify if a web element is not displayedhasAttribute
- Verify if a web element has a specific attributehasNoAttribute
- Verify if a web element does not have a specific attributeGetAttribute
- Get the specified attribute of a web element- Input Specific Functions
Input
- Send string value to a web elementClear
- Clear a web elementSend
- Send special key combinations like Ctrl+C, Enter, etc.
- Mouse Specific Functions
Click
- Click on a web elementRight Click
- Right-Click on a web elementHover
- Hover over a web elementDrag And Drop
- Drag and drop a web element to another web elementMouseDown
- Sends a mouse down event to elementMouseMove
- Sends a mouse move event to elementMouseUp
- Sends a mouse up event to element
- Check-Box Specific Functions
isChecked
- Verify if the check box is checkedisNotChecked
- Verify if the check box is not checked
- Select-Box Specific Functions
SelectByText
- Select option by textSelectByValue
- Select option by valueSelectByIndex
- Select option by index
-
Run-Time Utility Functions
Save
- Save Text or Value attribute of an element to run-time variableMatch
- Match the Text or Value of an element to stored run-time variableEqual
- To check equality of 2 variablesNotEqual
- To check inequality of 2 variablesPrint
- Prints out text, value or string to console
-
Assertion Functions
Assert
[Default] - Default assert without any parameters will assertText
of an elementAssert
[URL Over-ride] - URL Over-ride will assert the URL of the pageAssert
[Misc Param Over-ride] - Over-ridden assert will assert theParameter
value of an element
-
Driver Functions
Close
- Closes the current windowQuit
- Quits the browser instanceOpen
- Open a new browser instanceOpen/Get
- Open a new browser instance and get the URLGet
- Get a URLAcceptAlert
- Accept an alert box
-
- Reader package reads the data file and extracts the test execution configuration, test execution management and test cases.
- Executor package executes the scripts and provides interim results
- Reported package prints the results in user readable format (HTML document)
- jxl.jar - v2.6.12
- selenium-server-standalone - v2.51.0
- Adding advanced selenium functions - In-Progress
- Create an executable
- Better Errors
- Email configuration for report delivery
Upgrade to Object repositoryBasic selenium functionsReportingUsing results from execution module in reporting moduleTake screenshot in case of step failureAdding assertion checksAllow providing data file path from command line / run configBetter ReportsError focus in screenshot
- 24/02/2016: Adds
hasAttribute
&hasNoAttribute
actions - 11/02/2016: Updated project setup to be a Maven project
- 17/07/2014 : Moved JAR to other repo, for the time being, clone git and build to use
- 15/07/2014 : BREAKING CHANGES
- [New Feature] : All the elements will now be looked up from Object Repository sheet
- [Enhancement] : Documenting methods
- [Enhancement] : Restructuring packages
- 14/07/2014 :
- [New Feature] : Evaluate functionality
- [New Feature] : Print functionality
- [New Feature] : Window handling
- [Enhancement] : Attribute assertions
- [Enhancement] : Code refactored
- [Bug Fix] : Catch error of empty execution and report hashes
- [Bug Fix] : Catch error of AJAX listener for sites not using jQuery for XHR
- 27/06/2014 : Refactored selenium file code, added 'Equal','isChecked','isNotChecked', fixed javascript action
- 25/06/2014 : Added select box option saving, assert can also use run-time variable data, bug fix in run-time lookup
- 18/06/2014 : Error handling for missing parameter, option to skip a test step
- 13/06/2014 : Added selenium functions for Select box, reworked error filename, reword error message in html report, added functionality to run command to allow step removal from front & back
- 12/06/2014 : Added total test cases description while reading, fixed multiple module detail tab report bug, sorting test cases in report, fixed click - Scroll into view only if element out of viewport
- 11/06/2014 : Refactored code, added Save/Match functionality, added error focus on web element, uses Selenium-2.42.2
- 10/06/2014 : The result report now organize the test cases in accordians with status as the header color, reworked URL assert
- 06/06/2014 : Created JAR executable, added Selenium Grid by default, AJAX listeners, command line argument for Data file
- 04/06/2014 : Added more selenium funtions, restructured error handler for Action - Assert
- 02/06/2014 : Restructured executor to remove if/elsifs and use switch for action types.
- Undocumented : Reworked Reading and Executing for allowing user to reuse existing test case within another test case.