Issue Type: Improvement Improvement
Affects Versions: web-3.5.5
Assignee: Unassigned
Attachments: Home.java, SpringWebStories.java
Components: Spring Support
Created: 18/Feb/13 4:08 AM
Description:

When using the webDriver in the pages classes as follows:

public class Home extends AbstractPage {

private final WebDriver driver;

public Home(WebDriverProvider driverProvider) { super(driverProvider); this.driver = driverProvider.get(); }

public void open() { get("http://localhost:8080/bignibou/"); manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); }

public void enterDetails(String email, String status, String password) { driver.findElement(By.name("member.email")).sendKeys(email); driver.findElement(By.name("member.status")).sendKeys(status); driver.findElement(By.name("member.password")).sendKeys(password); }

public void doRegister() { driver.findElement(By.name("member.doRegister")).submit(); }

One get the following error:
WebDriver has not been found for this thread.
Please verify you are using the correct WebDriverProvider, with the appropriate credentials if using remote access, e.g. to SauceLabs: -DSAUCE_USERNAME=xxxxxx -DSAUCE_ACCESS_KEY=xxx-xxxx-xxxx-xxxx-xxx

Instead one has to use the webDriverProvider as follows:

public class Home extends AbstractPage {

private WebDriverProvider driverProvider;

public Home(WebDriverProvider driverProvider) { super(driverProvider); this.driverProvider = driverProvider; }

public void doRegister() { driverProvider.get().findElement(By.name("member.doRegister")).submit(); }

}

Maybe the error message could be more explicit.

Project: JBehave
Priority: Minor Minor
Reporter: Julien Martin
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to