Skip to content

Commit

Permalink
#37 Execute the before failing Statement-test on jenkins (Approach I)
Browse files Browse the repository at this point in the history
- Readded all Statement-tests to the testng_edmond_firefox.xml to
execute them on Jenkins
- Using the already added JavascriptExecutor.executeScript Solution I
  • Loading branch information
helkv committed Nov 12, 2018
1 parent 25535e3 commit 415fa71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions res/testng_edmond_firefox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@
<classes>

<!-- Statements -->
<!--

<class name="test.scripts.statements.CreateDefaultStatementTest"></class>

<class name="test.scripts.statements.CreateNewStatementTest"></class>

<class name="test.scripts.statements.CreateDefaultStatementPrivate"></class>
-->

<class name="test.scripts.statements.CreateNewStatementPrivate"></class>

<!-- End of Statements -->
Expand Down
4 changes: 1 addition & 3 deletions src/spot/pages/registered/EditItemPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ private void deleteMetadata(String metaDataLabelName) {
String currentName = metaDataLabel.getText();
if (currentName.equals(metaDataLabelName)) {
WebElement minusButton = metaDataLabel.findElement(By.xpath("./following-sibling::div/a[contains(@class,'fa-minus-square-o')]"));
//FIXME: On Jenkins the waiting for the staleness does not work -> reason?
// Try: Use a JavaSript click on the minusButton OR wait for the invisibility of metaDataLabel OR wait for another stale element to become stale
// The Selenium click method 'minusButton.click();' does not always work. Using the JavascriptExecutor.executeScript to click the minusButton instead:
((JavascriptExecutor) driver).executeScript("arguments[0].click();", minusButton);
// minusButton.click();
wait.until(ExpectedConditions.stalenessOf(metaDataLabel));
break;
}
Expand Down

0 comments on commit 415fa71

Please sign in to comment.