Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Selenium opens browser and loads page, then stops.

I have inherited a selenium project with no internal documentation and I'm a bit stuck on how to get it up and running (I am new to Selenium). We've gotten to a point where the program will open up an instance of firefox and load up the correct URL, but it never appears to even attempt to log in.

We're running Selenium 2.26.0 and Firefox 18.0.2.

My test suite is as follows (I've shortened the package and import directories for privacy):

package pro.selenium.testSuites;

import org.jbehave.core.annotations.UsingSteps;
import org.junit.Test;

import pro.automation.annotations.AutomationAnnotations.PageObjects;
import pro.automation.annotations.AutomationAnnotations.StoryPath;
import pro.selenium.pageObjects.PageExecutiveDashboard;
import pro.selenium.pageObjects.PageExecutiveOverallExpansion;
import pro.selenium.pageObjects.PageLogin;
import pro.selenium.pageObjects.PageTeamDriverStatistics;
import selenium.steps.LoginSteps;

@UsingSteps(instances={LoginSteps.class})
@PageObjects(list={PageLogin.class, PageExecutiveDashboard.class, PageTeamDriverStatistics.class, PageExecutiveOverallExpansion.class})
@StoryPath(path="Login.story")
public class LoginTest extends WebStories {

    @Test
    public void test(){}

}

The story is here:

Scenario: TC1241: Log In - Blank User Name and Password Error
Given I am on the Login page
When I click the Login button
Then I validate the Error text contains "Username is a required field."
And I validate the Error text contains "Password is a required field."
And I validate the User Name textfield is ""
And I validate the Password textfield is ""

When I run it all, the console shows only the following and then stops. On the browser itself there is never any change.

Scenario: TC1241: Log In - Blank User Name and Password Error
Given I am on the Login page

Any ideas of what I could be missing here?

share|improve this question
    
Is this Java? With... JCuke? Have you tried running a debugger to see if the code in the step definition gets executed? –  Yamikuronue Jun 6 at 16:39
    
I am not familiar with JCuke. I've debugged it and it hung up on a program and didn't show the source code (I'm using eclipse). If you stop the program the error "Jun 6, 2014 11:06:58 AM org.openqa.selenium.internal.seleniumemulation.WaitForPageToLoad handleSeleneseCommand WARNING: Cannot determine whether page supports ready state. Abandoning wait." comes into the console. –  MikeyH Jun 6 at 17:08
    
My bad, you marked it with JBehave, not JCuke –  Yamikuronue Jun 6 at 17:57

2 Answers 2

Please verify that LoginSteps.class has implementation of Given I am on the Login page step.

share|improve this answer

I would recommend you to move your Selenium version and drivers for your other browsers (IE,Chrome) to the latest version. So far 2.44. Verify Selenium and drivers from browsers are same version and also check according to your US (32 bits, 64 bits)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.