VooDoo Driver

Preview:

Citation preview

VooDooDriver ( Testing Framework)

Agenda of Training

Introduction of VooDooDriver. How to setup VooDooDriver. VooDooDriver demo script. How to execute VooDooDriver. VooDooDriver Elements.

Introduction of VooDooDriver

Automation Framework Coded in Java Based on Selenium WebDriverTest script in xml format

Advantages of VooDoo over Selenium

No need to write code for initializing browser. No need to write code for reading input file. No need to write code for handling pop up

window. Facilitates to use simple tag elements to use

web elements in your test script. No need to use action builder for advanced

user interactions.

Challenges

To write to a file using XML.Does not generate interactive report. Conditions and looping doesn’t work in XML.

VooDoo Demo Script

<soda><link id="moduleTab_Accounts"

jscriptevent="onmouseover" click="false"/><link id="Accounts_link" click="true"/><textfield id="name_basic" set="Adams" /><button id="search_form_submit" click="true"/></soda>

How to execute VooDoo script? Go to src->VoodooDriver.java. Right click -> Run As -> Run Configuration. Select tab "Arguments". Input the command line arguments --

browser=firefox -- suite=C:\Users\Sanjeev\workspace\voodoo\tests\suites\VooDooTest.xml.

--browser=firefox -- suite=C:\Users\Sanjeev\ workspace\voodoo\tests\suites\VooDooTest.xml.

VooDooDriver Elements

1. Attach 2. Variable3. Wait4. Puts5. Browser6. TextField7. TextArea8. Label

VooDooDriver Elements

9. Button10.Unordered List (UL)11. Select12. Radio13. Checkbox14. Frame15. Div16. Link

VooDooDriver Elements

17. Span18. Assert19. Jscriptevent20. Alert21. Screenshot

VooDooDriver Elements

Attach

<attach title="The new Window">//attach that new window

<button id="save" /><browser action="close" /> //close the

popup browser</attach>

VooDooDriver Elements

Variable

<var var="test" set="123" /> //create a variable ‘test’ and set it to 123

<textfield id="foo" set="{@test}" /> //set value of test to the text field

VooDooDriver Elements

Wait

<wait /> //wait for a period of 5 seconds<wait timeout = “2” /> //wait for a period of 2 seconds

Puts

<puts text=”Hello World” /> // print the text “Hello World”

VooDooDriver Elements

Browser

<browser url="http://cnn.com" /> //browse to CNN.com

<browser assert="Lastest News" /> //make sure ‘Latest News’ shows up on page

<browser action="close" /> //closes the browser

VooDooDriver Elements

TextField

<textfield id="foo" set="tree“ /> /* sets the value of the text field to ‘tree’ */

VooDooDriver Elements

TextArea

<textarea id="foo" set="this can be a very long string" />

/* sets the value of the textarea to ‘this can be a very long string’ */

VooDooDriver Elements

Unordered List (UL)

<UL name=”user_select” click=”true” />/* looks for the Unordered List by the name and

then clicks on it */

VooDooDriver Elements

Select

<select id="sel" set="1" /><select id="sel" set="9" />/* selects two options in the HTML select

element*/

VooDooDriver Elements

Checkbox

<checkbox name="massall" click="true" />/* the checkbox with name ‘massall’ will be

checked */

VooDooDriver Elements

Frame

<Frame name=“xframe“ />/* the Frame with name ‘xframe’ is called*/

VooDooDriver Elements

Div<div id="list_div_win"> //focus on

the ‘list_div_win’ section of the page<button value="Add" click="true" />//click the

button in the page section</div>/* goes to the div field ‘list_div_win’ and clicks

the button ‘Add’ and the performs an ‘onmouseup’ event for the button */

VooDooDriver Elements

Span

<span class="pageNumbers" assert="(1 - 2 of 6)" />

/* asserts that class ‘pageNumbers’ has the text ‘1-2 of 6’ */

VooDooDriver Elements

jscriptevent

<button value="Add" jscriptevent="onmouseup" />//onmouseup event for add button

VooDooDriver Elements

Alert

<alert alert="true" assert="Your registration will now be submitted, do you wish to proceed?"/>

VooDooDriver Elements

Screenshot

<screenshot file="C:\Users\Sanjeev\Desktop\screen\a1.png"/>

Data Driven using CSV

<csv file="C:/scripts/sugarcrm/csvs/users.csv var="user" />

<puts text="{@user.username}" /></csv>

Test Scenarios and Test Cases

You can create script for multiple test cases under tests folder.

You can create Test Scenario in the form of test suites that will contain the set of test cases which will contain under tests->suites.

VooDooDriver Log

After running your script the test report generates in the form of log file.

Soda Test Report:--testlog:C:\Users\Sanjeev\workspace\Crmdev\06-19-2013-12-38-02.588\CheckCreateLeave-06-19-2013-12-38-08-331.log

Select the path of the testlog and view it on another window.

Thank You.