Consider a simple DefaultSelenium object
DefaultSelenium sel = new
DefaultSelenium("http://localhost:8080/myapp",4444,"*iexplore","/myAppLevel1");
Now my server is configured with the -forcedBrowserMode "* firefox" option on the command line when I start it. However, I have two different batch files to start the server, one of which is forcibly used in firefox, one of which is forcibly connected to IE. FYI, -forcedBrowserMode overrides the settings inside the Java object instance.
The problem is in java, I cannot find a way to determine in which browser my DefaultSelenium object works ... I thought something like:
sel.getBrowserName();
But nothing of the kind exists. Are there any other creative ways to do this?
I need to know, because using the GWT web application to click on a button, you need to do it differently based on the browser. Alternatively, you may wonder why I even use -forcedBrowserMode, because then I can use the custom firefox / ie settings to test.
Thanks in advance for your help!
source
share