diff --git a/src/spot/components/configuration/ConfigurationAutosuggestionPanel.java b/src/spot/components/configuration/ConfigurationAutosuggestionPanel.java index 257797a..6703b01 100644 --- a/src/spot/components/configuration/ConfigurationAutosuggestionPanel.java +++ b/src/spot/components/configuration/ConfigurationAutosuggestionPanel.java @@ -11,7 +11,7 @@ public class ConfigurationAutosuggestionPanel extends BasePage { - @FindBy(xpath = "//div[@class='imj_adminPanel']/descendant::h2[contains(text(),'Automatic suggestion')]") + @FindBy(xpath = "//div[@class='imj_adminPanel']//h2[contains(text(),'Automatic suggestion')]") private WebElement autosuggestionPanelReveal; @FindBy(xpath = "//h2[contains(text(),'Automatic suggestion')]/../following-sibling::div[@class='imj_content']") diff --git a/src/spot/pages/CollectionEntryPage.java b/src/spot/pages/CollectionEntryPage.java index 8c1b478..105d6c7 100644 --- a/src/spot/pages/CollectionEntryPage.java +++ b/src/spot/pages/CollectionEntryPage.java @@ -448,6 +448,8 @@ public CollectionEntryPage uploadFile(String filepath) { upload.uploadFiles(filepath); SeleniumWrapper.waitForAjaxLoad(wait, elementToBecomeReloaded); + //Wait until loaderWrapper (which is shown after the Ajax reload) is not visible anymore, by waiting if uploadButton is clickable. + wait.until(ExpectedConditions.elementToBeClickable(uploadButton)); return PageFactory.initElements(driver, CollectionEntryPage.class); }