1

I am using DefaultSelenium and want to know which browser was being used. My project is set up so that there is a base class that provides a number of convenience methods and protected variables, and all scripts inherit from this base class and implement the macro logic that I call "plugins".

Due to differences in different browsers, I may need to perform steps a little differently (for example, firefox doesn't have the event javascript object that google chrome does)

Currently, all of these plugins instantiate the browser like this

browser = new DefaultSelenium("localhost",4444,"*firefox",homePage);

I am suggesting to change this to something like

browser = new DefaultSelenium("localhost",4444, browserType ,homePage);

Where browserType is a string that is one of the supported browsers. However if there was an easy way to just access this information that would be convenient. I have not found anything in the docs to accomplish this.

MxLDevs
  • 19,048
  • 36
  • 123
  • 194

0 Answers0