Selenium Excel AddIn

This project is data-driven test automation of Web applications using Excel.
"Selenium and WebDriver" Implementation for the Excel Add-ins.

TestCase Sample Files
https://seleniumexceladdin.codeplex.com/releases/view/120062

Features

  • Excel add-in implementation
  • Excel 2010 and 2013 support
  • Import TestCase File(*.html) form Selenium IDE
  • Very easy Data-Driven Test Automation
  • Automatic recording of evidence
  • IE, Firefox and Chrome support
  • COM Automation support. The available functions of the "Selenium Excel Addin" from any language.

addin01.jpg

Message for developers
contributions are welcome, specially fixing bugs, documenting, applying patches and suggesting new features.

COM Automation

addin execute command see. http://seleniumexceladdin.codeplex.com/SourceControl/latest#SeleniumExcelAddIn/SeleniumExcelAddIn/ActionId.cs

JavaScript (JScript on WSH)

The type on the Windows Command Prompt
cscript automation.js


automation.js
var excel = new ActiveXObject('Excel.Application');
excel.Visible = true;

var addin = excel.ComAddins('SeleniumExcelAddin').Object
WScript.Echo('SeleniumExcelAddin version = ' + addin.Version);

var shell = new ActiveXObject('WScript.Shell');
var filename = shell.CurrentDirectory + '\\selenium-excel-addin-sample.xlsx';

excel.Workbooks.Open(filename);

addin.Execute('WebDriverInternetExplorer');
addin.Execute('Run');

excel.ActiveWorkbook.Save();
excel.Quit();

Python

import win32com.client
import os, sys
import logging

logger = logging.getLogger()
logger.level = logging.DEBUG
logger.addHandler(logging.StreamHandler(sys.stdout))

excel = win32com.client.Dispatch("Excel.Application")
excel.Visible = True

addin = excel.ComAddins("SeleniumExcelAddIn").Object
logger.info("SeleniumExcelAddIn version = %s" % addin.Version)

filename = os.path.join(os.getcwd(), "selenium-excel-addin-sample.xlsx")
logger.info(filename)

excel.Workbooks.Open(filename)
addin.Execute('WebDriverFirefox')
addin.Execute("Run")
excel.ActiveWorkbook.Save()
excel.Quit()


http://selenium-excel-addin.jpn.org

Last edited Mar 26, 2014 at 4:17 PM by Takashi_Yoshizawa, version 27