Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
rohananvikar
Posts : 1
Join date : 2012-06-18
Location : India

error: Selenium can not be resolved Empty error: Selenium can not be resolved

Fri Aug 10, 2012 1:43 pm
I have following selenium RC code
i am using Eclipse
error message: Selenium can not be resolved. Whats wrong in the code?
Please help

package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.*;
import java.util.regex.Pattern;

public class Test {
@Before
public void setUp() throws Exception {
DefaultSelenium selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://10.0.0.104/hrms_integration/login.php");
selenium.start();
}

@Test
public void test() throws Exception {
selenium.open("/hrms_integration/login.php");
selenium.type("id=txtUserName", "admin");
selenium.type("name=txtPassword", "admin");
selenium.click("name=Submit");
selenium.waitForPageToLoad("30000");
selenium.click("link=Leave");
selenium.waitForPageToLoad("30000");
selenium.selectFrame("rightMenu");
selenium.click("name=allCheck[]");
selenium.type("id=txtEmployee", "testrohan Test");
selenium.click("id=btnSearch");
selenium.waitForPageToLoad("30000");
assertTrue(selenium.isTextPresent("No Records Found"));

}

@After
public void tearDown() throws Exception {
selenium.stop();
}
}
sanjeetravi
sanjeetravi
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-07-10
Age : 33
Location : Delhi

error: Selenium can not be resolved Empty Re: error: Selenium can not be resolved

Fri Aug 10, 2012 3:13 pm
do this in your code public class Test extends SeleneseTestCase

in order to resolve selenium you need to estend your test class with selenese test case...

If you are using test ng then use selenium testng helper jar and extend your class as SeleneseTestNgHelper
Back to top
Permissions in this forum:
You cannot reply to topics in this forum