How to configure Eclipse IDE for Cross Browser Testing


#1

For Browser Automation…!

I have given modifications in default.properties file

# for firefox

xlt.webDriver = firefox
xlt.webDriver.firefox.pathToDriverServer = D:/project/SeleniumTestScripts/geckodriver-v0.18.0-win64/geckodriver.exe
xlt.webDriver.firefox.pathToBrowser = D:/programs/FF_47/firefox.exe

same done for chrome and safari

But nothing worked unfortunately…!

How to point the property file mappings to TestCase class ?
Which all property files need to be modified ?


#2

The file default.properties is meant to document all default settings. Thus, it should not be modified.

Please use the file project.properties instead which is meant to contain all of your project’s settings. Just put the properties you quoted above there and run your test as JUnit-Test in Eclipse.

Please note that these settings are only effective for JUnit-Wrapper classes.
JUnit-classes that were generated by exporting test scripts to Java in Script Developer use XltDriver (customization of HtmlUnitDriver) explicitly. If you want to use a different driver, you’ll need to instantiate it by yourself in the constructor of your test class OR you use our utility class com.xceptance.xlt.engine.util.DefaultWebDriverFactory which reads the properties stated above and returns a properly configured WebDriver instance.


#3

ok…!

so i need to set web driver as firefox , chrome , safari or IE by specifying driver path and browser bin in exported test file
right ?

So what is the purpose of this default.properties ?
Where is these key value pair used ?

say for example

## FirefoxDriver settings
#xlt.webDriver.firefox.pathToDriverServer = /path/to/geckodriver
#xlt.webDriver.firefox.pathToBrowser = /path/to/firefox
xlt.webDriver.firefox.browserArgs =
xlt.webDriver.firefox.legacyMode = false

suppose if i am using the same key value pair in project.properties file, then will the test case automate in FF browser ?

All I need is to test the same scripts with Firefox, Chrome and IE, by mapping properties file. Is it possible ?


closed #4