Skip to main content


Showing posts from January, 2013

Using different Firefox Profiles with Selenium Tests Framework

Selenium Tests Framework (STF)  create a new firefox profile every time. To use custom profile, create STF default profile, put it in your project's resource folder (*/resources/profiles/customProfileDirCUSTFF). STF will use this default profile if it's there Define the path of specified profile in testng.xml file, e.g. <parameter name="firefoxUserProfilePath" value="c:\PathToProfile"/>, STF will use it instead.

Set up driver in Selenium Tests Fraemwork

If you don't want to use driver object provided by Selenium Tests Framework or want to use a new driver then you can instruct Selenium Tests Framework to use your own version of driver. Set up your own driver object, i.e. -        AndroidDriver driver = new AndroidDriver(); Instruct STF to use your own version of driver, i.e. -        WebUIDriver.setWebDriver(driver); And you can continue to use all the features of Selenium Tests Framework like - step by step reporting, rerunning failed tests etc, it is just that you are using your own version of driver and not the one provided by Selenium Tests Framework :)

Selenium Tests Framework and Chrome browser

It's not necessary to put chromedriver.exe under resources folder of Selenium Tests Framework (STF) project. It will use the default chromedriver if it is not added. Though you can also add it explicitly. please put chromedriver.exe under resources folder of STF project If Chrome browser is stuck, please update chromedriver.exe to new version from

Parameters used in Selenium Tests Framework

Following parameters can be set up in testng.xml file to make most use of Selenium Tests Framework. These parameters are already set in Sample Test Project  - There are two listeners available with Selenium Tests Framework -  com.seleniumtests.reporter.SeleniumTestsReporter - controls the generation of step by step reporting  and com.seleniumtests.core.TestRetryListener - reruns the failed test If you don't wish to use any of these features then you can remove the listeners (you don't want to do that ;-)) appURL - Application URL against which tests is to be run browser - Browser on which application is to be tested, available options are *firefox, *chrome, *iexplore runMode - The mode in which tests are to be run either locally or on selenium grid. Corresponding configurations are - LOCAL or ExistingGrid webDriverGrid - The location of selenium grid, like - http://localhost:4444/wd/hub webSessionTimeOut - time out to be used before selenium tests fr