Skip to content

Commit

Permalink
On behalf of Nikhil Bafna: Fixing AjaxElementLocator to work with
Browse files Browse the repository at this point in the history
SearchContext instead of WebDriver (part 2)
  • Loading branch information
barancev committed Mar 7, 2013
1 parent 27a4731 commit 5610c8f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@

package org.openqa.selenium.support.pagefactory;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.SearchContext;

import java.lang.reflect.Field;

public class AjaxElementLocatorFactory implements ElementLocatorFactory {
private final WebDriver driver;
private final SearchContext searchContext;
private final int timeOutInSeconds;

public AjaxElementLocatorFactory(WebDriver driver, int timeOutInSeconds) {
this.driver = driver;
public AjaxElementLocatorFactory(SearchContext searchContext, int timeOutInSeconds) {
this.searchContext = searchContext;
this.timeOutInSeconds = timeOutInSeconds;
}

public ElementLocator createLocator(Field field) {
return new AjaxElementLocator(driver, field, timeOutInSeconds);
return new AjaxElementLocator(searchContext, field, timeOutInSeconds);
}
}

0 comments on commit 5610c8f

Please sign in to comment.