!!

Welcome to Selenium Webdriver Forum

As a web user you can read and search through forum content. Once you have registered and signed you can post topics, post replies, set up watch lists, modify forum settings, and use private messaging.

Author Topic: how to do data driven testing in selenium ide with selenium RC  (Read 2509 times)

Athira Kannarambil

  • Web User
Hi
 As am working as a software tester.Selenium implementation gone
 success.And i need to know how can i perform data driven test in
 selenium.

Harish Kumar

  • Web User
Re: how to do data driven testing in selenium ide with selenium RC
« Reply #1 on: April 02, 2012, 08:06:51 PM »
do u want to extract data in database ?
 
On Tue, Dec 13, 2011 at 5:53 PM, Athira Kannarambil <
 


- Show quoted text -

--
 Thank You
 *HARISH KUMAR*

Athira Kannarambil

  • Web User
Re: how to do data driven testing in selenium ide with selenium RC
« Reply #2 on: April 02, 2012, 08:07:02 PM »
Thanks for reply
 I need to do testing with excel file.And let me know how i can import
 this excel file ?
 Am using Selenium IDE - 1.3.0 and Selenium RC 2.11.0 with Nunit.
 On Dec 13, 5:29 pm, Harish Kumar <harishbansa...@gmail.com> wrote:
 

- Show quoted text -

Selenium Webdriver

Re: how to do data driven testing in selenium ide with selenium RC
« Reply #2 on: April 02, 2012, 08:07:02 PM »

Mark Collin

  • Web User
Re: how to do data driven testing in selenium ide with selenium RC
« Reply #3 on: April 02, 2012, 08:07:13 PM »
You will need to write your own handler to extract data from the Excel
 spread sheet.  I can provide a Java implementation that may give you some
 pointers:
 https://github.com/Ardesco/Ebselen/blob/master/ebselen-core/src/main/...
 m/lazerycode/ebselen/customhandlers/ExcelHandler.java
 
https://github.com/Ardesco/Ebselen/blob/master/ebselen-tests/src/test...
 om/lazerycode/ebselen/website/google/GoogleDataDrivenExample.java
 

- Show quoted text -

Harish Kumar

  • Web User
Re: how to do data driven testing in selenium ide with selenium RC
« Reply #4 on: April 02, 2012, 08:07:25 PM »
you have to first put all values in variables. suppose i want to put a
 value in a variable like 'var' :
 
var = selenium.GetText("XPath or any other locator");
 
then make an excel sheet and write the column names . suppose u write
 exlVAR and save it.
 
now connect yr code to the excel sheet through Microsoft.Jet.OLEDB.4.0
 connectivity:
 
  string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
 Source="Path
 of your excel file";Extended Properties=""Excel 8.0;HDR=YES;""";
 
                    DbProviderFactory factory =
 DbProviderFactories.GetFactory("System.Data.OleDb");
 
                    using (DbConnection connection =
 factory.CreateConnection())
                     {
                         connection.ConnectionString = connectionString;
 
                        using (DbCommand command =
 connection.CreateCommand())
                         {
                             command.CommandText = "INSERT INTO ["Your sheet
 name"$](exlVAR) VALUES('" + var + "')";
                             connection.Open();
 
                            command.ExecuteNonQuery();
                         }
                     }
 
hope this will work for u .
 
On Tue, Dec 13, 2011 at 6:11 PM, Mark Collin <m...@ardescosolutions.com>wrote:
 


- Show quoted text -

--
 Thank You
 *HARISH KUMAR*

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
1400 Views
Last post February 21, 2012, 07:59:03 PM
by Raveendran P
5 Replies
1333 Views
Last post February 21, 2012, 08:31:11 PM
by Shuffs
0 Replies
832 Views
Last post February 21, 2012, 08:38:01 PM
by Shuffs
1 Replies
867 Views
Last post February 22, 2012, 06:17:28 PM
by terevos
8 Replies
3851 Views
Last post March 29, 2012, 03:59:09 PM
by MaC
1 Replies
1518 Views
Last post April 12, 2012, 04:06:15 PM
by Leo Laskin
1 Replies
942 Views
Last post July 04, 2012, 03:58:46 PM
by Phil