Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

» Selenium Webdriver
Sat Feb 04, 2017 6:47 pm by soumyamishrav@gmail.com

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

View previous topic View next topic Go down

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

Post by chandannj on 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.

chandannj

Posts : 1
Join date : 2012-06-06

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum