Skip to content

Commit bb6f0a6

Browse files
committed
Trying to fix test #3368
1 parent 452ff1f commit bb6f0a6

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/integration-test/groovy/au/org/ala/fieldcapture/RlpReportingSpec.groovy

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package au.org.ala.fieldcapture
22

33
import com.icegreen.greenmail.util.GreenMail
44
import com.icegreen.greenmail.util.GreenMailUtil
5+
import org.openqa.selenium.ElementClickInterceptedException
56
import pages.ProjectDownloadReport
67
import pages.ProjectIndex
78
import pages.RlpProjectPage
@@ -720,7 +721,17 @@ class RlpReportingSpec extends StubbedCasSpec {
720721
getFormSections().each {
721722
// Mark all sections except the Weed Distribution Survey as not applicable
722723
if (isOptional(it) && it != 'koRLP_-_Weed_distribution_survey') {
723-
markAsNotApplicable(it)
724+
try {
725+
markAsNotApplicable(it)
726+
}
727+
catch (ElementClickInterceptedException e) {
728+
// This can happen if the section is not visible, so we need to scroll it into view
729+
interact {
730+
moveToElement(it)
731+
}
732+
markAsNotApplicable(it)
733+
}
734+
724735
}
725736
}
726737
def section = $('#koRLP_-_Weed_distribution_survey')

0 commit comments

Comments
 (0)