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
chandannj
Posts : 1
Join date : 2012-06-06

Unable to run Selenium RC scripts in Firefox and Google chrome; running fine with "IE". Empty Unable to run Selenium RC scripts in Firefox and Google chrome; running fine with "IE".

Wed Jun 13, 2012 1:03 pm
Hi,
I'm unable to run very simple Selenium RC scripts in Firefox and
Google chrome; running fine with "IE".

I'm new to Selenium and was thinking to start using this tool.
I have been struggling with this from 2 weeks.

Here goes my script and error message...

Script 1 (Driver.java):

package Selenium_test_package;

import junit.framework.Test;
import junit.framework.TestSuite;
import junit.textui.TestRunner;

public class Driver{

public static void main(String[] args){
Test tst = SuiteToRun();
TestRunner.run(tst);
}
public static Test SuiteToRun(){
TestSuite suite = new TestSuite();
suite.addTestSuite(LoginLogout.class);
return suite;
}
}

Script 2 (LoginLogout.java):

package Selenium_test_package;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class LoginLogout extends SeleneseTestCase {
@Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 8080, "*firefox",
"http://demo.actitime.com/");
selenium.start();
}

@Test
public void testLoginLogout() throws Exception {
selenium.open("/login.do");
selenium.type("name=username", "admin");
selenium.type("name=pwd", "manager");
selenium.click("id=loginButton");
selenium.waitForPageToLoad("30000");
selenium.click("link=Logout");
}

@After
public void tearDown() throws Exception {
selenium.stop();
}
}


Error message:


.E
Time: 39.28
There was 1 error:
1)
testLoginLogout(Selenium_test_package.LoginLogout)com.thoughtworks.selenium.SeleniumException:
Timed out after 30000ms
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
91)
at
com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:
335)
at Selenium_test_package.LoginLogout.testLoginLogout(LoginLogout.java:
17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at
com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:
212)
at Selenium_test_package.Driver.main(Driver.java:11)

FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1

Thanks in advance,
Chandan.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum