-1
package com.html;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;

import junit.framework.TestCase;

public class Html5 extends TestCase{`enter code here`
    Selenium selenium1;
    public void setUp()
    {
        selenium1=new DefaultSelenium("localhost",4444,"*firefox","http://live.com");
        selenium1.start();
    }
}

Error appearing in com.thoughtworks.selenium.DefaultSelenium; and DefaultSelenium("localhost",4444,"*firefox","http://live.com"); line.

Please suggest.

Phil Bozak
  • 2,792
  • 1
  • 19
  • 27
Bhupendra Singh Rautela
  • 3,406
  • 6
  • 21
  • 25

2 Answers2

1

First :

What the enter code here string does there ?

Secondly :

If there is an error in the import com.thoughtworks.selenium.DefaultSelenium; and in the new DefaultSelenium, it's certainly that the jars are not in your classpath

selenium-server-standalone contains the Selenium server classes, but not the client ones, where DefaultSelenium is. You'll have to bring the client jars in your classpath, that is selenium2-java for this version I think

Grooveek
  • 10,046
  • 1
  • 27
  • 37
0

I think you need to give Path to firefox.exe in your Constructor..So

selenium1 = new DefaultSelenium("localhost",4444,"*firefox","http://live.com");   Goes like
selenium1 = new DefaultSelenium("localhost",4444,"*firefox C:\Documents and Settings\Mozilla Firefox\firefox.exe","http://live.com");

Try this once.

Arran
  • 24,648
  • 6
  • 68
  • 78
Virendra Joshi
  • 469
  • 4
  • 8
  • 25