use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class IntegrationSteps method setJmsRequestData.
@And("^sets jms request inputs source data$")
public void setJmsRequestData(DataTable sourceMappingData) {
for (Map<String, String> source : sourceMappingData.asMaps(String.class, String.class)) {
for (String field : source.keySet()) {
SelenideElement element = editPage.getJmsSubscribeComponent().checkAndGetFieldTypeById(field);
assertThat(element, notNullValue());
editPage.getJmsSubscribeComponent().setElementValue(source.get(field), element);
}
}
}
use of com.codeborne.selenide.SelenideElement in project syndesis-qe by syndesisio.
the class DragAndDropFile method dragAndDropFile.
/**
* Parameter file will be dragged to dragTarget, then method will wait for waitForElement to be visible
* For now it only works if your drag and drop target is inside ModalDialogPage.
*
* @param file
* @param dragTarget
* @param waitForElement
*/
public static void dragAndDropFile(File file, SelenideElement dragTarget, By waitForElement) {
createInputFile();
// find newly created file input element so we can put our file there
SelenideElement fileInput = $("#selenideUpload");
fileInput.uploadFile(file);
dispatchFileDragAndDropEvent("dragenter", "document", fileInput);
dispatchFileDragAndDropEvent("dragover", "document", fileInput);
dispatchFileDragAndDropEvent("drop", dragTarget, fileInput);
// wait until file appears on the page
$(waitForElement).waitUntil(appears, 5000);
// remove fake input file element
executeJavaScript("arguments[0].parentNode.removeChild(arguments[0]);", fileInput);
}
use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.
the class ProjectQualityGatePageTest method should_display_custom.
@Test
public void should_display_custom() {
QualityGate customQualityGate = createCustomQualityGate("should_display_custom");
associateWithQualityGate(customQualityGate);
ProjectQualityGatePage page = openPage();
SelenideElement selectedQualityGate = page.getSelectedQualityGate();
selectedQualityGate.shouldNot(Condition.hasText("Default"));
selectedQualityGate.should(Condition.hasText(customQualityGate.name()));
}
use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.
the class ProjectQualityGatePageTest method should_display_default.
@Test
public void should_display_default() {
QualityGate customQualityGate = createCustomQualityGate("should_display_default");
qualityGateClient().setDefault(customQualityGate.id());
ProjectQualityGatePage page = openPage();
SelenideElement selectedQualityGate = page.getSelectedQualityGate();
selectedQualityGate.should(Condition.hasText("Default"));
selectedQualityGate.should(Condition.hasText(customQualityGate.name()));
}
use of com.codeborne.selenide.SelenideElement in project sonarqube by SonarSource.
the class ProjectKeyPage method tryFineGrainedUpdate.
public ProjectKeyPage tryFineGrainedUpdate(String key, String newKey) {
SelenideElement form = $(".js-fine-grained-update[data-key=\"" + key + "\"]");
form.shouldBe(visible);
form.$("input").val(newKey);
form.$("button").click();
$("#update-key-confirm").click();
return this;
}
Aggregations