use of io.fabric8.selenium.WebDriverFacade in project fabric8 by fabric8io.
the class ProjectsPage method goToProjectsPage.
public void goToProjectsPage() {
WebDriverFacade facade = getFacade();
facade.untilLinkClickedLoop(projectsLinkBy, buildConfigsUrl);
facade.untilOneOf(signInBy, createProjectBy);
WebElement signIn = facade.findOptionalElement(signInBy);
if (signIn != null && signIn.isDisplayed()) {
logInfo("Waiting for signin button to be clicked");
facade.untilLinkClicked(signInBy);
signIntoGogs();
} else {
logInfo("Sign in button not present");
}
logWait("button: " + createProjectBy + "");
facade.untilIsEnabled(createProjectBy);
}
use of io.fabric8.selenium.WebDriverFacade in project fabric8 by fabric8io.
the class ProjectsPage method createProject.
/**
* Creates a new project using the create projects wizard and asserts it appears on the projects page
*/
public void createProject(NewProjectFormData form) {
goToProjectsPage();
WebDriverFacade facade = getFacade();
facade.untilLinkClicked(createProjectBy);
By nextButton = By.xpath("//button[@ng-click='execute()']");
// it can take a while to load pages in the wizard to lets increase the wait time lots! :)
facade.setDefaultTimeoutInSeconds(60 * 9);
String named = form.getNamed();
facade.form().clearAndSendKeys(By.xpath("//input[@ng-model='entity.named']"), named).submitButton(nextButton).submit();
facade.form().completeComboBox(By.xpath("//label[text() = 'Archetype']/following::input[@type='text']"), form.getArchetypeFilter()).submitButton(nextButton).submit();
untilNextWizardPage(facade, nextButton);
facade.form().submitButton(nextButton).submit();
untilNextWizardPage(facade, nextButton);
facade.form().completeComboBox(By.xpath("//label[text() = 'Flow']/following::input[@type='text']"), form.getJenkinsFileFilter()).submitButton(nextButton).submit();
facade.untilIsDisplayed(By.xpath("//a[@href='/forge/repos' and text()='Done']"));
logInfo("Created project: " + named);
goToProjectsPage();
// lets assert there's a link to the project page
facade.untilIsDisplayed(By.partialLinkText(named));
}
use of io.fabric8.selenium.WebDriverFacade in project fabric8 by fabric8io.
the class ComboCompleteInputValue method doInput.
@Override
public WebElement doInput() {
final WebDriverFacade facade = getFacade();
final By firstBy = getBy();
facade.sleep(Millis.seconds(2));
WebElement element = facade.findOptionalElement(firstBy);
if (element == null) {
return null;
}
super.doInputOnElement(element);
logInput("" + firstBy + " value: " + getValue());
facade.sleep(Millis.seconds(2));
element = facade.findOptionalElement(firstBy);
if (element != null) {
element.sendKeys(Keys.TAB);
facade.sleep(Millis.seconds(2));
element = facade.findOptionalElement(firstBy);
}
return element;
}
Aggregations