Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I am trying to test my site with Selenium RC + Nunit + asp.net.

I can get my tests to work in Firefox, Safari, Opera, IE 8 but not google chrome. I put this in for the browser argument

selenium = new DefaultSelenium(Server, ServerPort, "*chrome", DomainURL);

This always loads up Firefox though and not good chrome.

1 Answer

0 votes
by (62.9k points)

Chrome is used to launch a special mode of Firefox (a mode in which the applications have various privileges with fewer security restrictions). So, the fact that Firefox is launched instead of Google Chrome is normal. If you want to launch Google Chrome, you will have to use some other browser other than Chrome. Using Selenium RC in interactive mode, with something like this : 

$ java -jar selenium-server.jar -interactive

 and using the getNewBrowserSession command incorrectly like this :

cmd=getNewBrowserSession

 I get the list of browsers that are supported and not supported:

23:43:09.317 INFO - Got result: Failed to start new browser session: Browser not supported:

(Did you forget to add a *?)

Supported browsers include:

  *firefox

  *mock

  *firefoxproxy

  *pifirefox

  *chrome

  *iexploreproxy

  *iexplore

  *firefox3

  *safariproxy

  *googlechrome

  *konqueror

  *firefox2

  *safari

  *piiexplore

  *firefoxchrome

  *opera

  *iehta

  *custom

So, you should be able to launch Google Chrome using *google chrome instead of *chrome.

This is not done on Windows. And I cannot find anything in the documentation to back me up. Still, I hope, this might help you.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...