How can I automate Google Chrome using Selenium RC?

0 votes

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

I am able to test my work on Firefox,Safari,opera,IE 8 but not google chrome. I entered this as an argument

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

This always loads Firefox and not Google Chrome. 

How can be get it to run on Chrome?.

Mar 6 in Selenium by Vaishnavi
• 1,160 points
95 views

1 answer to this question.

0 votes

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
 on session null

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, with a bit of luck, this might help you.

Anyway, happy learning!

answered Mar 6 by Surya
• 970 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

How can I download the *.jar file from http:// seleniumhq.org using selenium WebDriver?

For Selenium Standalone Server use this: profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive"); and ...READ MORE

answered Apr 9, 2018 in Selenium by Martin
• 4,220 points
469 views
0 votes
1 answer

How can I implement Selenium using C#?

Reference https://www.seleniumhq.org/docs/03_webdriver.jsp#the-5-minute-getting-started-guide using OpenQA.Selenium.Firefox; using OpenQA.Selenium; class GoogleSuggest { ...READ MORE

answered Apr 9, 2018 in Selenium by Neville
43 views
+4 votes
1 answer

How can I configure Eclipse for using Selenium?

Follow the following steps to configure your ...READ MORE

answered Dec 12, 2018 in Selenium by Nabarupa
221 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
566 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
895 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
559 views
+1 vote
2 answers
0 votes
1 answer

How to save as PDF on Chrome using Selenium

Hey, Vaishnavi! You could try to disable ...READ MORE

answered Mar 8 in Selenium by Surya
• 970 points
3,142 views