Solved

Is the data driven testing possible using selenium?

Posted on 2009-07-09
5
1,946 Views
Last Modified: 2012-05-07
Since selenium is mainly used for web automation...

can we use this for data driven testcases?
if so can you please share by taking an example.
0
Comment
Question by:Suhas .
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 10

Expert Comment

by:MaduKp
ID: 24817470
I just googled it and found this,

http://groups.google.com/group/selenium-ruby/browse_thread/thread/f8d1b2cf75253b15

Please refer the sangeeta's post.. I also have been wrestling with this issue of DDT ...

I think it is a good example.

Let us know if you are looking some thing else
0
 
LVL 10

Assisted Solution

by:MaduKp
MaduKp earned 25 total points
ID: 24817678
0
 

Assisted Solution

by:sadi77
sadi77 earned 25 total points
ID: 24820153
Hi,
I found this is very useful script.
Data Driven Selenium using Excel Macros
http://clearspace.openqa.org/thread/15616

another SQAForum thread which is not what MaduKp: mentioned above - a sample script
http://www.sqaforums.com/showflat.php?Number=467996

0
 
LVL 9

Accepted Solution

by:
Suveer Patil earned 300 total points
ID: 24820654
Hi,
yes it is possible....
We are using the same tool in our office.
what you need to do is record your script using Selenium IDE in firefox browser
then export the script in any of the programming languages in which you are comfortable....(Hope you know how to export since you are using that tool now)
i'm using java as an example here....
Now you have to connect to the Selenium RC by using the jar's which are getting with the Selenium RC (which is used to test the application in any of the browsers where as using Selenium IDE you can only run the scripts in firefox)
now just open the script in eclipse or netbeans
then you can define a class and constructors to initiate the variables and you can run the script then the selenium will chck for the multiple values for a field.
first you have to give the invalid values then the valid values
An example is attached for date validation (format dd/mm/yyyy), string validation and number validation
If you still didn't get then get back to me so that i can help you further.....
Cheers,
Suveer
 
 

public class fieldValidations {
 
      public String[] dayValidation() {
 
            String day[] = { "45", "00", "1", " 1", "1 ", "a2", "2a", "1#", "#1",
 
                        "#1" };
 
            return day;
 
      }
 
      public String[] monthValidation() {
 
            String month[] = { "13", "00", "1", " 1", "1 ", "a2", "2a", "1#" };
 
            return month;
 
      }
 
      public String[] yearValidation() {
 
            String year[] = { "0000", "asdf", "as12", "122#", "#232",
 
                        "12as", "12  ", "  09", "09", "009" };
 
            return year;
 
      }
 
      public String[] numberValidation() {
 
            String[] number = { "as", "2a", "a2", "2@", "@2", "  ", "@#", "-23" };
 
            return number;
 
      }
 
      public  String[] stringValidation(){
 
            String[] string = {"asdf","1234","!@#$"};
 
            return string;
 
      }
 
      }

Open in new window

0
 
LVL 9

Author Closing Comment

by:Suhas .
ID: 31601757
Thanks for the answers...

 i got a brief idea on it...
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
System to Monitor FAX 3 330
This KeyDownEvent is not happening? 2 375
PHP Development - QA - CI - Jenkins - Docker 5 255
Automated mobile software testing 8 239
Test Automation Framework Before we proceed into the depth of framework design and related components, I would like to clarify some common notions related to Software Test Automation. It is often considered that Automation will help in identif…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question